Well, I found something very interesting. If I put these statements in setup, I get the elusive reset button! A push of the on/off button turns the T4 off and then right back on. If I set press_on_time to 50 ms or higher, then I get an on/off switch that uses short presses of the button. Now I can have a menu option to let users set the button as power on/off or reset. Is there any flaw in my thinking here? Will this be a reliable thing coded this way?
Code:
// configured an a reset switch
void NullCB() {}
void setup()
{
set_arm_power_button_press_on_time(arm_power_button_press_on_time_0ms); // 0 ms to hold power button for startup
set_arm_power_button_callback(&NullCB); // Immediate shut off from on/off button press
}
Code:
// configured an an on/off switch
void NullCB() {}
void setup()
{
set_arm_power_button_press_on_time(arm_power_button_press_on_time_50ms); // 50 ms to hold power button for startup
set_arm_power_button_callback(&NullCB); // Immediate shut off from on/off button press
}