let's have voltage as int

This commit is contained in:
rusefi 2023-05-15 19:30:53 -04:00
parent aaa7b52bb7
commit 9bc11cdc69
2 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ void CanRxThread(void*)
bool withNewValue = false;
if (frame.EID == configuration.inputCanID) {
ASSIGN_IF_CHANGED(configuration.BoostVoltage, getFloat(&frame, 1));
ASSIGN_IF_CHANGED(configuration.BoostVoltage, getInt(&frame, 1));
ASSIGN_IF_CHANGED(configuration.BoostCurrent, getFloat(&frame, 3));
ASSIGN_IF_CHANGED(configuration.TBoostMin, getInt(&frame, 5));
} else if (frame.EID == configuration.inputCanID + 1) {

View File

@ -13,7 +13,7 @@ mfs_error_t InitFlash();
void saveConfiguration();
void ReadOrDefault();
#define PERSISTENCE_VERSION 3
#define PERSISTENCE_VERSION 4
struct GDIConfiguration {
void resetToDefaults();
@ -21,7 +21,7 @@ struct GDIConfiguration {
int updateCounter;
// CAN protocol: packet 0, offset 1
float BoostVoltage;
uint16_t BoostVoltage;
// CAN protocol: packet 0, offset 3
float BoostCurrent;
// CAN protocol: packet 0, offset 5