coroutines: wip compiles but does not link

This commit is contained in:
Kevin Hester
2020-10-09 14:16:51 +08:00
parent 10f64590a9
commit 2044427e97
23 changed files with 132 additions and 299 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#include "PowerStatus.h"
#include "concurrency/PeriodicTask.h"
#include "concurrency/OSThread.h"
/**
* Per @spattinson
@@ -15,16 +15,17 @@
#define BAT_MILLIVOLTS_FULL 4100
#define BAT_MILLIVOLTS_EMPTY 3500
class Power : public concurrency::PeriodicTask
class Power : private concurrency::OSThread
{
public:
Observable<const meshtastic::PowerStatus *> newStatus;
Power();
void readPowerStatus();
void loop();
virtual bool setup();
virtual void doTask();
virtual uint32_t runOnce();
void setStatusHandler(meshtastic::PowerStatus *handler) { statusHandler = handler; }
protected: