You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fresh install on x86 Linux Ubuntu 20.04.1 LTS, of Platformio and VS Code. Cloned this repo, imported the project (and folder), and compiled it with ESP32 toolchain.
Fails to compile with following errors
In file included from src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:3:0:
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:17:9: error: 'std::function' has not been declared
std::function<uint8_t()> getter,
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:17:17: error: expected ',' or '...' before '<' token
std::function<uint8_t()> getter,
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:34:8: error: 'function' in namespace 'std' does not name a template type
std::function<uint8_t()> getter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:35:8: error: 'function' in namespace 'std' does not name a template type
std::function<void(uint8_t)> setter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h: In constructor 'AlarmSettingsTimeSpinner::AlarmSettingsTimeSpinner(uint8_t, uint8_t, int)':
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:21:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
this->getter = getter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:21:19: error: 'getter' was not declared in this scope
this->getter = getter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:22:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter = setter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:22:19: error: 'setter' was not declared in this scope
this->setter = setter;
^
src/Apps/Alarm/AlarmListener.cpp: In member function 'virtual void AlarmListener::handle()':
src/Apps/Alarm/AlarmListener.cpp:28:33: warning: statement has no effect [-Wunused-value]
if (dayInWeek == 0) {dayInWeek == 6;}
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp: In member function 'virtual void AlarmSettingsTimeSpinner::render()':
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:20:60: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
(void)snprintf(valueStr, sizeof(valueStr), "%02d", this->getter());
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp: In member function 'virtual bool AlarmSettingsTimeSpinner::handleTouch(uint8_t, uint8_t)':
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:40:13: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
if (this->getter() == 0) {
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:41:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(this->maxValue);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:43:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(this->getter() - 1);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:43:23: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
this->setter(this->getter() - 1);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:52:13: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
if (this->getter() == this->maxValue) {
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:53:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(0);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:55:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(this->getter() + 1);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:55:23: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
this->setter(this->getter() + 1);
^
*** [.pio/build/ttgo-t-watch/src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp.o] Error 1
src/Apps/Alarm/Components/AlarmDisplay.cpp: In member function 'virtual void AlarmDisplay::render()':
src/Apps/Alarm/Components/AlarmDisplay.cpp:56:63: warning: 'prevX' may be used uninitialized in this function [-Wmaybe-uninitialized]
prevX += 4 + TTGOClass::getWatch()->tft->textWidth(days[i]);
^
The text was updated successfully, but these errors were encountered:
Just found a solution:
Add #include functional (with functional between brackets <>) in files src/Userinterface/Components/Component.h and src/Core/Hardware/ESP32.h. Compiling and Uploading now successful. The programming experts may know a better solution, but this worked for me.
The watch is now in a continuous startup loop...
Hi,
Fresh install on x86 Linux Ubuntu 20.04.1 LTS, of Platformio and VS Code. Cloned this repo, imported the project (and folder), and compiled it with ESP32 toolchain.
Fails to compile with following errors
In file included from src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:3:0:
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:17:9: error: 'std::function' has not been declared
std::function<uint8_t()> getter,
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:17:17: error: expected ',' or '...' before '<' token
std::function<uint8_t()> getter,
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:34:8: error: 'function' in namespace 'std' does not name a template type
std::function<uint8_t()> getter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:35:8: error: 'function' in namespace 'std' does not name a template type
std::function<void(uint8_t)> setter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h: In constructor 'AlarmSettingsTimeSpinner::AlarmSettingsTimeSpinner(uint8_t, uint8_t, int)':
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:21:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
this->getter = getter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:21:19: error: 'getter' was not declared in this scope
this->getter = getter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:22:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter = setter;
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.h:22:19: error: 'setter' was not declared in this scope
this->setter = setter;
^
src/Apps/Alarm/AlarmListener.cpp: In member function 'virtual void AlarmListener::handle()':
src/Apps/Alarm/AlarmListener.cpp:28:33: warning: statement has no effect [-Wunused-value]
if (dayInWeek == 0) {dayInWeek == 6;}
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp: In member function 'virtual void AlarmSettingsTimeSpinner::render()':
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:20:60: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
(void)snprintf(valueStr, sizeof(valueStr), "%02d", this->getter());
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp: In member function 'virtual bool AlarmSettingsTimeSpinner::handleTouch(uint8_t, uint8_t)':
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:40:13: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
if (this->getter() == 0) {
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:41:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(this->maxValue);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:43:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(this->getter() - 1);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:43:23: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
this->setter(this->getter() - 1);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:52:13: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
if (this->getter() == this->maxValue) {
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:53:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(0);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:55:10: error: 'class AlarmSettingsTimeSpinner' has no member named 'setter'
this->setter(this->getter() + 1);
^
src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp:55:23: error: 'class AlarmSettingsTimeSpinner' has no member named 'getter'
this->setter(this->getter() + 1);
^
*** [.pio/build/ttgo-t-watch/src/Apps/Alarm/Components/Settings/AlarmSettingsTimeSpinner.cpp.o] Error 1
src/Apps/Alarm/Components/AlarmDisplay.cpp: In member function 'virtual void AlarmDisplay::render()':
src/Apps/Alarm/Components/AlarmDisplay.cpp:56:63: warning: 'prevX' may be used uninitialized in this function [-Wmaybe-uninitialized]
prevX += 4 + TTGOClass::getWatch()->tft->textWidth(days[i]);
^
The text was updated successfully, but these errors were encountered: