updated device input functions to be more c like

This commit is contained in:
sirlilpanda
2025-09-01 23:20:13 +12:00
parent 9b23f9bded
commit 1c10c10ca7

View File

@@ -10,25 +10,26 @@ int main() {
if (strcmp(device.state.state_name, "off_state.c") != 0) return 0;
// turn on the device
device.methods.pressPwr(&device);
pressPwrButton(&device);
if (strcmp(device.state.state_name, "lock_state.c") != 0) return 0;
// send the current string
device.methods.pressStrInput(&device);
pressStrInputButton(&device);
if (strcmp(device.state.state_name, "lock_state.c") != 0) return 0;
// send in the right string
device.entered_string = "pwd";
device.methods.pressStrInput(&device);
pressStrInputButton(&device);
if (strcmp(device.state.state_name, "unlock_state.c") != 0) return 0;
// try to enter debug mode
device.entered_string = "dbg";
device.methods.pressStrInput(&device);
pressStrInputButton(&device);
if (strcmp(device.state.state_name, "debug_state.c") != 0) return 0;
// try to power down
device.methods.pressPwr(&device);
pressPwrButton(&device);
if (strcmp(device.state.state_name, "off_state.c") != 0) return 0;
return 0;