Restructure data objects, BREAKING backwards compatibility!
This was necessary as some IDs were used that are reserved in spec v0.4. The also includes some additions to the Python parser script.
This commit is contained in:
@@ -19,5 +19,7 @@
|
||||
#define BOARD_HAS_PWM_PORT DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), pwm_switch))
|
||||
#define BOARD_HAS_LOAD_OUTPUT DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), load))
|
||||
#define BOARD_HAS_USB_OUTPUT DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), usb_pwr))
|
||||
#define BOARD_HAS_TEMP_FETS DT_NODE_EXISTS(DT_CHILD(DT_PATH(adc_inputs), temp_fets))
|
||||
#define BOARD_HAS_TEMP_BAT DT_NODE_EXISTS(DT_CHILD(DT_PATH(adc_inputs), temp_bat))
|
||||
|
||||
#endif /* BOARD_H_ */
|
||||
|
||||
+2
-3
@@ -246,7 +246,7 @@ void daq_update()
|
||||
load.power = load.bus->voltage * load.current;
|
||||
#endif
|
||||
|
||||
#if DT_NODE_EXISTS(DT_CHILD(DT_PATH(adc_inputs), temp_bat))
|
||||
#if BOARD_HAS_TEMP_BAT
|
||||
// battery temperature calculation
|
||||
float bat_temp = ntc_temp(ADC_POS(temp_bat), vref, ADC_GAIN(temp_bat));
|
||||
|
||||
@@ -262,8 +262,7 @@ void daq_update()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DT_NODE_EXISTS(DT_CHILD(DT_PATH(adc_inputs), temp_fets))
|
||||
// MOSFET temperature calculation
|
||||
#if BOARD_HAS_TEMP_FETS
|
||||
dcdc.temp_mosfets = ntc_temp(ADC_POS(temp_fets), vref, ADC_GAIN(temp_fets));
|
||||
#endif
|
||||
|
||||
|
||||
+753
-743
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -27,9 +27,9 @@
|
||||
#define ID_CONF 0x06 // configurable settings
|
||||
#define ID_CAL 0x07 // calibration
|
||||
#define ID_REPORT 0x0A // reports
|
||||
#define ID_DFU 0x0D // device firmware upgrade
|
||||
#define ID_RPC 0x0E // remote procedure calls
|
||||
#define ID_PUB 0x0F // publication setup
|
||||
#define ID_DFU 0x0F // device firmware upgrade
|
||||
#define ID_PUB 0x100 // publication setup
|
||||
#define ID_CTRL 0x8000 // control functions
|
||||
|
||||
/*
|
||||
@@ -46,7 +46,7 @@
|
||||
* Increment the version number each time any data object IDs stored in NVM are changed. Otherwise
|
||||
* data might get corrupted.
|
||||
*/
|
||||
#define DATA_OBJECTS_VERSION 4
|
||||
#define DATA_OBJECTS_VERSION 05
|
||||
|
||||
extern bool pub_serial_enable;
|
||||
extern bool pub_can_enable;
|
||||
|
||||
Reference in New Issue
Block a user