mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-17 17:03:12 +00:00
Merge branch 'master' into hub-prices
This commit is contained in:
commit
d8f3ae8b07
@ -1026,7 +1026,7 @@ void WiFi_connect() {
|
||||
}
|
||||
#endif
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.setSleep(WIFI_PS_MAX_MODEM);
|
||||
WiFi.setSleep(WIFI_PS_MIN_MODEM);
|
||||
#if defined(ESP32)
|
||||
if(wifi.power >= 195)
|
||||
WiFi.setTxPower(WIFI_POWER_19_5dBm);
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
#include "PricesFromHubStream.h"
|
||||
|
||||
int PricesFromHubStream::available() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int PricesFromHubStream::read() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int PricesFromHubStream::peek() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PricesFromHubStream::flush() {
|
||||
|
||||
}
|
||||
|
||||
size_t PricesFromHubStream::write(const uint8_t *buffer, size_t size) {
|
||||
for(int i = 0; i < size; i++) {
|
||||
write(buffer[i]);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
size_t PricesFromHubStream::write(uint8_t b) {
|
||||
buf[pos++] = b;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void PricesFromHubStream::get(PricesContainer* container) {
|
||||
memcpy(container, buf, pos);
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
#ifndef _PRICESFROMHUBSTREAM_H
|
||||
#define _PRICESFROMHUBSTREAM_H
|
||||
|
||||
#include "Stream.h"
|
||||
#include "PricesContainer.h"
|
||||
|
||||
class PricesFromHubStream: public Stream {
|
||||
public:
|
||||
int available();
|
||||
int read();
|
||||
int peek();
|
||||
void flush();
|
||||
void get(PricesContainer*);
|
||||
size_t write(const uint8_t *buffer, size_t size);
|
||||
size_t write(uint8_t);
|
||||
|
||||
int pos = 0;
|
||||
uint8_t buf[512];
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
x
Reference in New Issue
Block a user