2022-07-18 12:31:09 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-08-29 17:19:30 -07:00
|
|
|
#include "wideband_config.h"
|
|
|
|
|
2022-07-18 12:31:09 -07:00
|
|
|
/* +0 offset */
|
|
|
|
struct livedata_common_s {
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
uint32_t test;
|
|
|
|
float vbatt;
|
|
|
|
};
|
|
|
|
uint8_t pad0[32];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
/* +32 offset */
|
|
|
|
struct livedata_afr_s {
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
float afr;
|
|
|
|
float temperature;
|
|
|
|
float nernstVoltage;
|
|
|
|
float pumpCurrentTarget;
|
|
|
|
float pumpCurrentMeasured;
|
|
|
|
float heaterDuty;
|
|
|
|
};
|
|
|
|
uint8_t pad[32];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
/* update functions */
|
|
|
|
void SamplingUpdateLiveData();
|
|
|
|
|
|
|
|
/* access functions */
|
|
|
|
const struct livedata_common_s * getCommonLiveDataStructAddr();
|
2022-08-29 17:19:30 -07:00
|
|
|
const struct livedata_afr_s * getAfrLiveDataStructAddr(const int ch);
|