@@ -63,7 +63,7 @@ void lua_break_signal_interrupt(void)
63
63
1 );
64
64
}
65
65
66
- void run_lua (bool factory_reset )
66
+ void run_lua (bool factory_reset , bool is_paired )
67
67
{
68
68
lua_State * L = luaL_newstate ();
69
69
L_global = L ; // Only used for interrupts
@@ -125,9 +125,18 @@ void run_lua(bool factory_reset)
125
125
}
126
126
127
127
// Show splash screen
128
- status = luaL_dostring (L , "frame.display.text('Ready to Pair', 200, 140);"
129
- "frame.display.text('Frame '..frame.bluetooth.address():sub(-2, -1), 245, 210, { color = 'ORANGE' });"
130
- "frame.display.show();" );
128
+ if (!is_paired )
129
+ {
130
+ status = luaL_dostring (L , "frame.display.text('Ready to Pair', 200, 140);"
131
+ "frame.display.text('Frame '..frame.bluetooth.address():sub(-2, -1), 245, 210, { color = 'GREEN' });"
132
+ "frame.display.show();" );
133
+ }
134
+ else
135
+ {
136
+ status = luaL_dostring (L , "frame.display.text('Frame is Paired', 185, 140);"
137
+ "frame.display.text('Frame '..frame.bluetooth.address():sub(-2, -1), 245, 210, { color = 'ORANGE' });"
138
+ "frame.display.show();" );
139
+ }
131
140
132
141
if (status != LUA_OK )
133
142
{
0 commit comments