2020-02-22 01:01:26 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-06-05 14:50:06 +00:00
|
|
|
#include <map>
|
2020-06-28 04:19:49 +00:00
|
|
|
#include "GPSStatus.h"
|
|
|
|
#include "NodeStatus.h"
|
2020-10-10 01:57:57 +00:00
|
|
|
#include "PowerStatus.h"
|
|
|
|
#include "graphics/Screen.h"
|
2022-06-05 14:50:06 +00:00
|
|
|
#include "mesh/generated/telemetry.pb.h"
|
2022-10-13 11:01:24 +00:00
|
|
|
#ifndef ARCH_PORTDUINO
|
2022-10-13 10:55:28 +00:00
|
|
|
#include <SparkFun_ATECCX08a_Arduino_Library.h>
|
2022-10-13 11:01:24 +00:00
|
|
|
#endif
|
2020-03-15 23:47:38 +00:00
|
|
|
|
2022-02-28 21:19:38 +00:00
|
|
|
extern uint8_t screen_found;
|
2022-03-24 16:36:56 +00:00
|
|
|
extern uint8_t screen_model;
|
2022-03-28 14:55:58 +00:00
|
|
|
extern uint8_t cardkb_found;
|
2022-05-09 18:12:49 +00:00
|
|
|
extern uint8_t kb_model;
|
2022-04-27 09:05:08 +00:00
|
|
|
extern uint8_t rtc_found;
|
2022-10-13 10:55:28 +00:00
|
|
|
extern uint8_t keystore_found;
|
2022-03-28 14:55:58 +00:00
|
|
|
|
2022-10-17 08:00:00 +00:00
|
|
|
extern bool rIf_wide_lora;
|
2022-04-25 05:13:41 +00:00
|
|
|
extern bool eink_found;
|
2022-09-08 02:32:12 +00:00
|
|
|
extern bool pmu_found;
|
2020-02-24 19:21:08 +00:00
|
|
|
extern bool isCharging;
|
2020-03-15 23:47:38 +00:00
|
|
|
extern bool isUSBPowered;
|
|
|
|
|
2022-10-13 11:01:24 +00:00
|
|
|
#ifndef ARCH_PORTDUINO
|
2022-10-13 10:55:28 +00:00
|
|
|
extern ATECCX08A atecc;
|
2022-10-13 11:01:24 +00:00
|
|
|
#endif
|
2022-10-13 10:55:28 +00:00
|
|
|
|
2022-10-07 13:33:07 +00:00
|
|
|
extern uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658+1];
|
2022-06-05 14:50:06 +00:00
|
|
|
|
2022-10-01 10:02:29 +00:00
|
|
|
extern int TCPPort; // set by Portduino
|
|
|
|
|
2020-03-15 23:47:38 +00:00
|
|
|
// Global Screen singleton.
|
2020-10-10 01:57:57 +00:00
|
|
|
extern graphics::Screen *screen;
|
|
|
|
// extern Observable<meshtastic::PowerStatus> newPowerStatus; //TODO: move this to main-esp32.cpp somehow or a helper class
|
2020-06-28 04:19:49 +00:00
|
|
|
|
2020-10-10 01:57:57 +00:00
|
|
|
// extern meshtastic::PowerStatus *powerStatus;
|
|
|
|
// extern meshtastic::GPSStatus *gpsStatus;
|
|
|
|
// extern meshtastic::NodeStatusHandler *nodeStatusHandler;
|
2020-04-10 19:18:48 +00:00
|
|
|
|
|
|
|
// Return a human readable string of the form "Meshtastic_ab13"
|
|
|
|
const char *getDeviceName();
|
2020-04-23 23:55:25 +00:00
|
|
|
|
2022-03-01 18:40:21 +00:00
|
|
|
extern uint32_t timeLastPowered;
|
|
|
|
|
2021-03-27 02:19:59 +00:00
|
|
|
extern uint32_t rebootAtMsec;
|
2022-01-21 21:03:26 +00:00
|
|
|
extern uint32_t shutdownAtMsec;
|
2021-03-27 02:19:59 +00:00
|
|
|
|
2022-04-02 14:02:26 +00:00
|
|
|
extern uint32_t serialSinceMsec;
|
|
|
|
|
2021-03-28 04:16:37 +00:00
|
|
|
// If a thread does something that might need for it to be rescheduled ASAP it can set this flag
|
|
|
|
// This will supress the current delay and instead try to run ASAP.
|
|
|
|
extern bool runASAP;
|
|
|
|
|
2022-02-02 00:32:26 +00:00
|
|
|
void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), clearBonds();
|