diff --git a/arduino/hev_prototype_v1/src/UILoop.cpp b/arduino/hev_prototype_v1/src/UILoop.cpp index 7eaf63e0e82a3e0bb51ad45a42611f340a733252..de9b0135be9877e745d904e9083cc3e5445021eb 100644 --- a/arduino/hev_prototype_v1/src/UILoop.cpp +++ b/arduino/hev_prototype_v1/src/UILoop.cpp @@ -398,6 +398,8 @@ void UILoop::cmdGeneral(cmd_format &cf) { break; case CMD_GENERAL::STANDBY : _breathing_loop->doStandby(); break; + case CMD_GENERAL::GET_PERSONAL: reportPersonal(); + break; default: break; } diff --git a/arduino/hev_prototype_v1/src/common.h b/arduino/hev_prototype_v1/src/common.h index c8b92a1ebc97bfe14f78cb78f44d5b1f252d3cac..4688beb22b32f4d46fbd0012fd1b6cc9fdf0caf3 100644 --- a/arduino/hev_prototype_v1/src/common.h +++ b/arduino/hev_prototype_v1/src/common.h @@ -67,10 +67,11 @@ enum CMD_TYPE : uint8_t { }; enum CMD_GENERAL : uint8_t { - START = 1, - STOP = 2, - RESET = 3, - STANDBY = 4 + START = 1, + STOP = 2, + RESET = 3, + STANDBY = 4, + GET_PERSONAL = 5 }; // Taken from the FSM doc. Correct as of 1400 on 20200417 diff --git a/raspberry-dataserver/CommsCommon.py b/raspberry-dataserver/CommsCommon.py index 24ac88264eab85d57584f8464b5b60b642cad4e9..79afd44a3323205bbdcee67f22f4d32ecc89b86c 100644 --- a/raspberry-dataserver/CommsCommon.py +++ b/raspberry-dataserver/CommsCommon.py @@ -35,10 +35,11 @@ class CMD_TYPE(Enum): @unique class CMD_GENERAL(Enum): - START = 1 - STOP = 2 - RESET = 3 - STANDBY = 4 + START = 1 + STOP = 2 + RESET = 3 + STANDBY = 4 + GET_PERSONAL = 5 # Taken from the FSM doc. Correct as of 1400 on 20200417 @unique diff --git a/raspberry-dataserver/CommsDebug2.py b/raspberry-dataserver/CommsDebug2.py index 04853b4e5146faa98dc979db53b60fa50a5a606d..dc827f6cf251313c22f1c82768fade13dd18af52 100755 --- a/raspberry-dataserver/CommsDebug2.py +++ b/raspberry-dataserver/CommsDebug2.py @@ -40,7 +40,7 @@ class Dependant(object): # logging.info(f"Alarm: {payload.alarm_code} of priority: {payload.alarm_type}") if payload.getType() == PAYLOAD_TYPE.DATA.value: - logging.info(f"payload received: {payload}") + #logging.info(f"payload received: {payload}") #logging.info(f"payload received: {payload.timestamp}") #logging.info(f"Fsm state: {payload.fsm_state}") fsm = payload.fsm_state @@ -94,10 +94,12 @@ async def commsDebug(): await asyncio.sleep(1) # # Change TIMEOUT of breathing cycle (BUFF-PRE-INHALE) await asyncio.sleep(1) + print('get personal info') + send_cmd(cmd_type="GENERAL", cmd_code="GET_PERSONAL") await asyncio.sleep(10) print('send personal info') - #send_personal("JJ Jones", 22, 'M', 123, 55) + send_personal("Jessica Jones", 29, 'F', 175, 58) #print('get targets pcac, current') #send_cmd(cmd_type="GET_TARGETS", cmd_code="PC_AC", param=0)