Skip to content

Backport: Add header guards and clean up Button/TimeControl (master-c)#154

Merged
livingkurt merged 1 commit intomaster-cfrom
backport/152-cleanup-into-master-c
Mar 28, 2026
Merged

Backport: Add header guards and clean up Button/TimeControl (master-c)#154
livingkurt merged 1 commit intomaster-cfrom
backport/152-cleanup-into-master-c

Conversation

@livingkurt
Copy link
Copy Markdown
Collaborator

Summary

Port of master PR #152 cleanup changes to the master-c branch (C language port). Only the changes applicable to the C codebase are included — the C branch already has proper header guards on most files, so the delta is smaller.

  • Add proper #ifndef/#define guard to ColorConstants.h (replacing #pragma once)
  • Rename Colortypes.h guard from COLOR_HCOLORTYPES_H to match the filename
  • Remove helios_wakeup() from embedded ISR in Button.cpp — not needed on embedded, same as the C++ branch fix
  • Extract repeated time_get_current_time() calls into a const local variable in button_update() for clarity
  • Remove unused Led.h include from TimeControl.cpp, reorder includes to put local headers first
  • Update TimeControl.h comments on time_get_current_time() and time_microseconds() for clarity — removes stale vortexlib reference, adds clear warning on microseconds API

Test plan

  • CLI builds cleanly
  • Embedded builds cleanly

Made with Cursor

Port of master PR #152 cleanup changes to the master-c branch:

- Add proper #ifndef/#define guard to ColorConstants.h (replacing #pragma once)
- Rename Colortypes.h guard from COLOR_H to COLORTYPES_H to match filename
- Remove helios_wakeup() from embedded ISR (not used on embedded)
- Extract repeated time_get_current_time() calls into const local variable
  in button_update() for clarity
- Remove unused Led.h include from TimeControl.cpp, reorder includes
- Update TimeControl.h comments on time_get_current_time() and
  time_microseconds() for clarity

Made-with: Cursor
@livingkurt livingkurt merged commit 46675e5 into master-c Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants