Screen cleanups and refactoring
Work towards separating out how Screen interacts with other stuff. * `Screen` should now be thread-safe. All commands to it are put in a queue and handled in `doTask` from the `loop()` task. * Break dependency from `BluetoothUtil` to `Screen` by changing the pairing request into a callback. * All accesses to screen now happen through the class. * Fix `drawRows` so that the text scrolls along with frame animations. * Remove example code that wasn't used.
This commit is contained in:
+3
-3
@@ -2,12 +2,12 @@
|
||||
#include <Arduino.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "main.h"
|
||||
#include "mesh-pb-constants.h"
|
||||
#include "MeshService.h"
|
||||
#include "MeshBluetoothService.h"
|
||||
#include "NodeDB.h"
|
||||
#include "GPS.h"
|
||||
#include "screen.h"
|
||||
#include "Periodic.h"
|
||||
#include "PowerFSM.h"
|
||||
|
||||
@@ -118,7 +118,7 @@ MeshPacket *MeshService::handleFromRadioUser(MeshPacket *mp)
|
||||
sendOurOwner(mp->from);
|
||||
|
||||
String lcd = String("Joined: ") + mp->payload.variant.user.long_name + "\n";
|
||||
screen_print(lcd.c_str());
|
||||
screen.print(lcd.c_str());
|
||||
}
|
||||
|
||||
return mp;
|
||||
@@ -360,4 +360,4 @@ void MeshService::onNotify(Observable *o)
|
||||
{
|
||||
DEBUG_MSG("got gps notify\n");
|
||||
onGPSChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user