updated device input functions to be more c like
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user