Browse Source

fix: keypress bitfield truncated multi-key mask to 1 bit

common.h's split (a8bbc3b) merged System.keypress into the bitfield
block as a 1-bit field, matching the PC tool's stale copy instead of
embedded main.h's original unsigned char. The ISR stores a multi-bit
K_* mask (up to 0x1f); truncated to 1 bit, only K_RIGHT ever survived
- so menus could be entered/selected but not navigated (up/down) or
exited (left).
k4be 1 week ago
parent
commit
522095585d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      soft/common.h

+ 1 - 1
soft/common.h

@@ -134,7 +134,6 @@ struct system_s {
 	unsigned dgps:1; /* GGA reports a DGPS-quality fix - the receiver's own doing, not CONFFLAG_ENABLE_SBAS (our SBAS-search request) */
 	unsigned gps_initialized:2;
 	unsigned gps_only:1;
-	unsigned keypress:1;
 	unsigned tracking_paused:1;
 	unsigned tracking_auto_paused:1;
 	unsigned open_new_file:1;
@@ -143,6 +142,7 @@ struct system_s {
 	unsigned char status;
 	unsigned char display_state;
 	unsigned char working_mode;
+	unsigned char keypress; // bitmask of K_* (main.h); needs full width, not a bitfield bit
 };
 
 /* Auto-pause state (soft/autopause.c, compiled unmodified into both builds -