mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-13 15:37:03 +00:00
Fixed build errors
This commit is contained in:
parent
f334847e82
commit
afcc542e25
@ -1199,7 +1199,7 @@ void AmsWebServer::translationsJson() {
|
||||
}
|
||||
|
||||
server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1DA);
|
||||
File file = LittleFS.open(buf);
|
||||
File file = LittleFS.open(buf, "r");
|
||||
server.setContentLength(file.size());
|
||||
|
||||
server.send(200, MIME_JSON);
|
||||
@ -2050,7 +2050,7 @@ HTTPUpload& AmsWebServer::uploadFile(const char* path) {
|
||||
if(LittleFS.exists(path)) {
|
||||
LittleFS.remove(path);
|
||||
}
|
||||
file = LittleFS.open(path, FILE_WRITE);
|
||||
file = LittleFS.open(path, "w");
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) {
|
||||
debugger->printf_P(PSTR("handleFileUpload Open file and write: %u\n"), upload.currentSize);
|
||||
}
|
||||
|
||||
@ -845,7 +845,7 @@ void handleUiLanguage() {
|
||||
|
||||
if(status == HTTP_CODE_OK) {
|
||||
snprintf_P((char*) commonBuffer, BUF_SIZE_COMMON, PSTR("/translations-%s.json"), ui.language);
|
||||
File file = LittleFS.open((char*) commonBuffer, FILE_WRITE);
|
||||
File file = LittleFS.open((char*) commonBuffer, "w");
|
||||
size_t written = http.writeToStream(&file);
|
||||
file.close();
|
||||
if(written > 0) {
|
||||
|
||||
@ -46,7 +46,7 @@ void PulseMeterCommunicator::getCurrentConfig(MeterConfig& meterConfig) {
|
||||
void PulseMeterCommunicator::setupGpio() {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("Setting up Pulse Meter GPIO, rx: %d, tx: %d\n"), meterConfig.rxPin, meterConfig.txPin);
|
||||
if(meterConfig.rxPin != NOT_A_PIN) {
|
||||
pinMode(meterConfig.rxPin, meterConfig.rxPinPullup ? INPUT_PULLUP : INPUT_PULLDOWN);
|
||||
pinMode(meterConfig.rxPin, meterConfig.rxPinPullup ? INPUT_PULLUP : INPUT);
|
||||
}
|
||||
if(meterConfig.txPin != NOT_A_PIN) {
|
||||
pinMode(meterConfig.txPin, OUTPUT);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user