Skip to content
Snippets Groups Projects
Commit 45b57531 authored by Karol Hennessy's avatar Karol Hennessy
Browse files

get_personal command added

parent bbd692a8
Branches
No related merge requests found
......@@ -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;
}
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
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