Delete the sensor part and adapt to the latest crc display.
This commit is contained in:
@@ -94,7 +94,7 @@ void GxEPDDisplay::fillRect(int x, int y, int w, int h) {
|
|||||||
display_crc.update<int>(y);
|
display_crc.update<int>(y);
|
||||||
display_crc.update<int>(w);
|
display_crc.update<int>(w);
|
||||||
display_crc.update<int>(h);
|
display_crc.update<int>(h);
|
||||||
display.fillRect(x*SCALE_X, y*SCALE_Y, w*SCALE_X, h*SCALE_Y, _curr_color);
|
display.fillRect(x*scale_x, y*scale_y, w*scale_x, h*scale_y, _curr_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxEPDDisplay::drawRect(int x, int y, int w, int h) {
|
void GxEPDDisplay::drawRect(int x, int y, int w, int h) {
|
||||||
@@ -102,7 +102,7 @@ void GxEPDDisplay::drawRect(int x, int y, int w, int h) {
|
|||||||
display_crc.update<int>(y);
|
display_crc.update<int>(y);
|
||||||
display_crc.update<int>(w);
|
display_crc.update<int>(w);
|
||||||
display_crc.update<int>(h);
|
display_crc.update<int>(h);
|
||||||
display.drawRect(x*SCALE_X, y*SCALE_Y, w*SCALE_X, h*SCALE_Y, _curr_color);
|
display.drawRect(x*scale_x, y*scale_y, w*scale_x, h*scale_y, _curr_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxEPDDisplay::drawXbm(int x, int y, const uint8_t* bits, int w, int h) {
|
void GxEPDDisplay::drawXbm(int x, int y, const uint8_t* bits, int w, int h) {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ lib_deps =
|
|||||||
rweather/Crypto @ ^0.4.0
|
rweather/Crypto @ ^0.4.0
|
||||||
stevemarple/MicroNMEA @ ^2.0.6
|
stevemarple/MicroNMEA @ ^2.0.6
|
||||||
zinggjm/GxEPD2 @ 1.6.2
|
zinggjm/GxEPD2 @ 1.6.2
|
||||||
|
bakercp/CRC32 @ ^2.0.0
|
||||||
|
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
upload_protocol = nrfutil
|
upload_protocol = nrfutil
|
||||||
@@ -72,6 +73,7 @@ build_flags =
|
|||||||
-D MAX_GROUP_CHANNELS=8
|
-D MAX_GROUP_CHANNELS=8
|
||||||
-D BLE_PIN_CODE=123456
|
-D BLE_PIN_CODE=123456
|
||||||
-D OFFLINE_QUEUE_SIZE=256
|
-D OFFLINE_QUEUE_SIZE=256
|
||||||
|
-D AUTO_OFF_MILLIS=0
|
||||||
; -D BLE_DEBUG_LOGGING=1
|
; -D BLE_DEBUG_LOGGING=1
|
||||||
; -D MESH_PACKET_LOGGING=1
|
; -D MESH_PACKET_LOGGING=1
|
||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
@@ -91,6 +93,7 @@ build_flags =
|
|||||||
-I examples/companion_radio/ui-new
|
-I examples/companion_radio/ui-new
|
||||||
-D MAX_CONTACTS=100
|
-D MAX_CONTACTS=100
|
||||||
-D MAX_GROUP_CHANNELS=8
|
-D MAX_GROUP_CHANNELS=8
|
||||||
|
-D AUTO_OFF_MILLIS=0
|
||||||
; -D BLE_PIN_CODE=123456
|
; -D BLE_PIN_CODE=123456
|
||||||
; -D BLE_DEBUG_LOGGING=1
|
; -D BLE_DEBUG_LOGGING=1
|
||||||
; -D MESH_PACKET_LOGGING=1
|
; -D MESH_PACKET_LOGGING=1
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BU
|
|||||||
|
|
||||||
WRAPPER_CLASS radio_driver(radio, board);
|
WRAPPER_CLASS radio_driver(radio, board);
|
||||||
|
|
||||||
MeshPocketSensorManager sensors = MeshPocketSensorManager();
|
SensorManager sensors = SensorManager();
|
||||||
|
|
||||||
VolatileRTCClock fallback_clock;
|
VolatileRTCClock fallback_clock;
|
||||||
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
||||||
@@ -42,31 +42,3 @@ mesh::LocalIdentity radio_new_identity() {
|
|||||||
RadioNoiseListener rng(radio);
|
RadioNoiseListener rng(radio);
|
||||||
return mesh::LocalIdentity(&rng); // create new random identity
|
return mesh::LocalIdentity(&rng); // create new random identity
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MeshPocketSensorManager::begin() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MeshPocketSensorManager::loop() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MeshPocketSensorManager::querySensors(uint8_t requester_permission, CayenneLPP& telemetry) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int MeshPocketSensorManager::getNumSettings() const {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* MeshPocketSensorManager::getSettingName(int i) const {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* MeshPocketSensorManager::getSettingValue(int i) const {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MeshPocketSensorManager::setSettingValue(const char* name, const char* value) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -29,17 +29,5 @@ void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr);
|
|||||||
void radio_set_tx_power(uint8_t dbm);
|
void radio_set_tx_power(uint8_t dbm);
|
||||||
mesh::LocalIdentity radio_new_identity();
|
mesh::LocalIdentity radio_new_identity();
|
||||||
|
|
||||||
class MeshPocketSensorManager : public SensorManager {
|
extern SensorManager sensors;
|
||||||
public:
|
|
||||||
MeshPocketSensorManager() {};
|
|
||||||
bool begin() override;
|
|
||||||
bool querySensors(uint8_t requester_permissions, CayenneLPP& telemetry);
|
|
||||||
void loop();
|
|
||||||
int getNumSettings() const override;
|
|
||||||
const char* getSettingName(int i) const override;
|
|
||||||
const char* getSettingValue(int i) const override;
|
|
||||||
bool setSettingValue(const char* name, const char* value) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern MeshPocketSensorManager sensors;
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user