File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -848,7 +848,7 @@ void beginLEDs()
848848// Configure the on board MAX17048 fuel gauge
849849void beginFuelGauge ()
850850{
851- if (productVariant == REFERENCE_STATION )
851+ if (HAS_NO_BATTERY )
852852 return ; // Reference station does not have a battery
853853
854854 // Set up the MAX17048 LiPo fuel gauge
Original file line number Diff line number Diff line change @@ -763,7 +763,12 @@ void createSettingsString(char* newSettings)
763763
764764 stringRecord (newSettings, " logFileName" , logFileName);
765765
766- if (productVariant != REFERENCE_STATION) // Ref Stn does not have a battery
766+ if (HAS_NO_BATTERY) // Ref Stn does not have a battery
767+ {
768+ stringRecord (newSettings, " batteryIconFileName" , " src/BatteryBlank.png" );
769+ stringRecord (newSettings, " batteryPercent" , " " );
770+ }
771+ else
767772 {
768773 // Determine battery icon
769774 int iconLevel = 0 ;
@@ -921,7 +926,12 @@ void createDynamicDataString(char* settingsCSV)
921926 stringRecord (settingsCSV, " ecefY" , ecefY, 3 );
922927 stringRecord (settingsCSV, " ecefZ" , ecefZ, 3 );
923928
924- if (productVariant != REFERENCE_STATION) // Ref Stn does not have a battery
929+ if (HAS_NO_BATTERY) // Ref Stn does not have a battery
930+ {
931+ stringRecord (settingsCSV, " batteryIconFileName" , " src/BatteryBlank.png" );
932+ stringRecord (settingsCSV, " batteryPercent" , " " );
933+ }
934+ else
925935 {
926936 // Determine battery icon
927937 int iconLevel = 0 ;
Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ ProductVariant productVariant = RTK_SURVEYOR;
8181//The rising edge of the TP signal indicates the true top-of-second
8282#define HAS_GNSS_TP_INT (productVariant == REFERENCE_STATION)
8383
84+ //Macro to show if the the RTK variant has no battery
85+ #define HAS_NO_BATTERY (productVariant == REFERENCE_STATION)
86+ #define HAS_BATTERY (!HAS_NO_BATTERY)
87+
8488typedef enum
8589{
8690 BUTTON_ROVER = 0 ,
You can’t perform that action at this time.
0 commit comments