Commit 58325a51 authored by Karol Hennessy's avatar Karol Hennessy

fix to data comms

parent 000c6b94
Pipeline #1710 failed with stages
......@@ -44,7 +44,7 @@
#include <Arduino_Due_pinout.h>
#endif
#define HEV_FORMAT_VERSION 0xB6
#define HEV_FORMAT_VERSION 0xB7
//
const float MAX_VALVE_FRAC_OPEN = 0.74;
......@@ -335,8 +335,8 @@ struct readback_data_format {
uint16_t duration_pause = 0;
uint16_t duration_exhale = 0;
uint8_t valve_air_in = 0;//
uint8_t valve_o2_in = 0;
float valve_air_in = 0.0;//
float valve_o2_in = 0.0;
uint8_t valve_inhale = 0;
uint8_t valve_exhale = 0;
uint8_t valve_purge = 0;
......
......@@ -151,8 +151,8 @@ void loop()
ui_loop.reportReadbackValues();
ui_loop.reportCycleReadings();
ui_loop.reportAlarms();
ui_loop.reportIVTReadings();
ui_loop.reportDebugValues(); // data duplicated to fast and readback
//ui_loop.reportIVTReadings();
//ui_loop.reportDebugValues(); // data duplicated to fast and readback
ui_loop.reportTargets();
// per cycle receiver
......
......@@ -267,7 +267,7 @@ class HEVVersionError(Exception):
@dataclass
class PayloadFormat:
# class variables excluded from init args and output dict
_RPI_VERSION: ClassVar[int] = field(default=0xB6, init=False, repr=False)
_RPI_VERSION: ClassVar[int] = field(default=0xB7, init=False, repr=False)
_dataStruct: ClassVar[Any] = field(default=Struct("<BIB"), init=False, repr=False)
_byteArray: ClassVar[bytearray] = field(default=None, init=False, repr=False)
......@@ -737,8 +737,8 @@ class TargetFormat(PayloadFormat):
# for receiving DataFormat from microcontroller
# fill the struct from a byteArray,
def fromByteArray(self, byteArray):
logging.warn(f"bytearray size {len(byteArray)} ")
logging.warn(binascii.hexlify(byteArray))
#logging.warn(f"bytearray size {len(byteArray)} ")
#logging.warn(binascii.hexlify(byteArray))
tmp_payload_type = 0
tmp_mode = 0
(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment