LogData renamed to DeviceStatus / dev_stat

Rationale: Logging is used for historic data, but error flags are instantaneous data. Device status
is more generic and now contains also the internal temperature measurement.
This commit is contained in:
Martin Jaeger
2019-11-01 09:54:01 +01:00
parent af4af04697
commit 22f9138a15
17 changed files with 359 additions and 359 deletions
+3 -3
View File
@@ -16,7 +16,7 @@
#include "dcdc.h"
#include "pcb.h"
#include "log.h"
#include "device_status.h"
#include "debug.h"
#include "half_bridge.h"
@@ -26,7 +26,7 @@
#include <stdlib.h> // for min/max function
#include <stdio.h>
extern LogData log_data;
extern DeviceStatus dev_stat;
#if FEATURE_DCDC_CONVERTER == 0
@@ -199,7 +199,7 @@ void Dcdc::control()
// what to do... (e.g. call dcdc_self_destruction)
current_debounce_counter++;
if (current_debounce_counter > CONTROL_FREQUENCY) { // waited 1s before setting the flag
log_data.error_flags |= (1 << ERR_HS_MOSFET_SHORT);
dev_stat.error_flags |= (1 << ERR_HS_MOSFET_SHORT);
}
}
else { // hardware is fine