Skip to content

Commit

Permalink
increase online time to 60 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
mverch67 committed Oct 3, 2024
1 parent 535b9bc commit 294bcf5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/MeshtasticView.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class ViewController;
class MeshtasticView : public DeviceGUI
{
public:
const uint32_t secs_until_offline = 60 * 60 + 60;

MeshtasticView(const DisplayDriverConfig *cfg, DisplayDriver *driver, ViewController *_controller);
virtual void init(IClientBase *client);
virtual void task_handler(void);
Expand Down
2 changes: 1 addition & 1 deletion source/MeshtasticView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ bool MeshtasticView::lastHeardToString(uint32_t lastHeard, char *buf)
else // after 60 days
buf[0] = '\0';

return timediff <= 1810; // 15min + some tolerance
return timediff <= secs_until_offline;
}

const char *MeshtasticView::deviceRoleToString(enum eRole role)
Expand Down
2 changes: 1 addition & 1 deletion source/TFTView_320x240.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3354,7 +3354,7 @@ bool TFTView_320x240::applyNodesFilter(uint32_t nodeNum, bool reset)
if (lv_obj_has_state(objects.nodes_filter_offline_switch, LV_STATE_CHECKED)) {
time_t curtime, lastHeard = (time_t)panel->LV_OBJ_IDX(node_lh_idx)->user_data;
time(&curtime);
if (curtime - lastHeard - 10 > 15 * 60)
if (curtime - lastHeard > secs_until_offline)
hide = true;
}
if (lv_obj_has_state(objects.nodes_filter_public_key_switch, LV_STATE_CHECKED)) {
Expand Down

0 comments on commit 294bcf5

Please sign in to comment.