add signal strength meter
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define KIMODEM_PREFS_H
|
||||
|
||||
|
||||
namespace config {
|
||||
namespace Config {
|
||||
|
||||
// Networking
|
||||
|
||||
@@ -14,6 +14,11 @@ void SetStartTryConnecting(bool opt);
|
||||
|
||||
|
||||
// Misc.
|
||||
bool EnableMeter();
|
||||
void SetEnableMeter(bool opt);
|
||||
|
||||
|
||||
// Misc. control
|
||||
void FactoryDefaults();
|
||||
|
||||
}
|
||||
@@ -6,29 +6,20 @@
|
||||
|
||||
#define ANSI_CLEAR_SCREEN "\33[2J"
|
||||
|
||||
/*
|
||||
class Display {
|
||||
public:
|
||||
Display();
|
||||
namespace Display {
|
||||
|
||||
void Clear();
|
||||
void Draw();
|
||||
bool HasDisplay();
|
||||
void Init();
|
||||
void Clear();
|
||||
void Clear(bool hint);
|
||||
void Draw();
|
||||
bool HasDisplay();
|
||||
|
||||
void Print(const char *);
|
||||
void Println(const char *);
|
||||
void SetCursor(int16_t x, int16_t y);
|
||||
|
||||
|
||||
} // namespace Display
|
||||
|
||||
void Print(const char *);
|
||||
void Println(const char *);
|
||||
void SetCursor(int16_t x, int16_t y);
|
||||
};
|
||||
*/
|
||||
|
||||
#if defined(ADAFRUIT_OLED)
|
||||
#include "internal/DisplayAdafruitOLED.h"
|
||||
#else
|
||||
#include "internal/DisplayNone.h"
|
||||
#endif
|
||||
|
||||
|
||||
static Display display;
|
||||
|
||||
|
||||
#endif
|
||||
20
include/WiFiMeter.h
Normal file
20
include/WiFiMeter.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef KIMODEM_WIFI_METER_H
|
||||
#define KIMODEM_WIFI_METER_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
|
||||
namespace Meter {
|
||||
|
||||
|
||||
void Begin();
|
||||
void Enable();
|
||||
void Disable();
|
||||
void Update();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -10,6 +10,7 @@ bool SetupWiFi();
|
||||
bool Autoconnect(Dictionary &pb);
|
||||
bool Autoconnect(Dictionary &pb, bool reset);
|
||||
bool TryConnect(Dictionary &pb);
|
||||
void WiFiRefresh(Dictionary &pb);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef KIMODEM_ADAFRUIT_OLED_H
|
||||
#define KIMODEM_ADAFRUIT_OLED_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <SPI.h>
|
||||
#include <Wire.h>
|
||||
#include <Adafruit_SSD1306.h>
|
||||
|
||||
class Display {
|
||||
public:
|
||||
Display();
|
||||
|
||||
void Clear();
|
||||
void Draw();
|
||||
bool HasDisplay();
|
||||
|
||||
void Print(const char *);
|
||||
void Println(const char *);
|
||||
void SetCursor(int16_t x, int16_t y);
|
||||
private:
|
||||
Adafruit_SSD1306 oled;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,20 +0,0 @@
|
||||
#ifndef KIMODEM_DISPLAY_SERIAL
|
||||
#define KIMODEM_DISPLAY_SERIAL
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
|
||||
class Display {
|
||||
public:
|
||||
Display() {};
|
||||
|
||||
void Clear();
|
||||
void Draw();
|
||||
bool HasDisplay();
|
||||
|
||||
void Print(const char *);
|
||||
void Println(const char *);
|
||||
void SetCursor(int16_t x, int16_t y);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user