Issue #15: add redundant invers error flag

This commit is contained in:
Mario Hüttel 2020-09-05 20:17:35 +02:00
parent 1f8a6347e9
commit b2b1702670

View File

@ -42,6 +42,7 @@ struct error_flag {
const char *name;
enum safety_flag flag;
bool error_state;
bool error_state_inv;
bool persistent;
uint32_t key;
};
@ -74,7 +75,7 @@ struct analog_mon {
#define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
#define ERR_FLAG_ENTRY(errflag, persistency) {.name=#errflag, .flag = (errflag), .error_state = false, .persistent = (persistency), .key = 0UL}
#define ERR_FLAG_ENTRY(errflag, persistency) {.name=#errflag, .flag = (errflag), .error_state = false, .error_state_inv = true, .persistent = (persistency), .key = 0UL}
#define TIM_MON_ENTRY(mon, min, max, flag) {.name=#mon, .monitor = (mon), .associated_flag=(flag), .min_delta = (min), .max_delta = (max), .last = 0ULL, .enabled= false}
#define ANA_MON_ENTRY(mon, min_value, max_value, flag) {.name=#mon, .monitor = (mon), .associated_flag=(flag), .min = (min_value), .max = (max_value), .value = 0.0f, .valid = false}