mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-01 10:21:59 +00:00
Merge pull request #3131 from liekmarflow/feature/board-api-hooks
Add board loop hook for periodic work
This commit is contained in:
@@ -165,6 +165,8 @@ void loop() {
|
|||||||
command[0] = 0; // reset command buffer
|
command[0] = 0; // reset command buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
board.loop(); // let the board feed its watchdog, run periodic housekeeping
|
||||||
|
|
||||||
#ifdef ETHERNET_ENABLED
|
#ifdef ETHERNET_ENABLED
|
||||||
ethernet_loop_maintain();
|
ethernet_loop_maintain();
|
||||||
if (ethernet_read_line(ethernet_command, sizeof(ethernet_command))) {
|
if (ethernet_read_line(ethernet_command, sizeof(ethernet_command))) {
|
||||||
|
|||||||
@@ -153,6 +153,8 @@ void loop() {
|
|||||||
command[0] = 0; // reset command buffer
|
command[0] = 0; // reset command buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
board.loop(); // let the board feed its watchdog, run periodic housekeeping
|
||||||
|
|
||||||
the_mesh.loop();
|
the_mesh.loop();
|
||||||
sensors.loop();
|
sensors.loop();
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
|
|||||||
@@ -76,6 +76,10 @@ public:
|
|||||||
virtual const char* getShutdownReasonString(uint8_t reason) { return "Not available"; }
|
virtual const char* getShutdownReasonString(uint8_t reason) { return "Not available"; }
|
||||||
|
|
||||||
virtual bool handleCommand(const char* command, uint32_t sender_timestamp, char* reply) { return false; }
|
virtual bool handleCommand(const char* command, uint32_t sender_timestamp, char* reply) { return false; }
|
||||||
|
|
||||||
|
// Called from the example main loops. Lets a board feed its watchdog and
|
||||||
|
// run periodic housekeeping. Default no-op.
|
||||||
|
virtual void loop() { /* no op */ }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user