[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

'JUSTIFY_TEXT_RIGHT' was not declared in this scope RSS feed
Forum Index » tcMenu Arduinio library
Author Message
jacobez


Joined: Mar 21, 2021
Messages: 10
Offline
I've used the tcMenu Designer to create a menu and code for me.
Upon compiling for an Uno, the Arduino IDE (Ver 1.8.19) gives me the following error:
".....\tcMenuLiquidCrystal.cpp: In member function 'void LiquidCrystalRenderer::renderMenuItem(uint8_t, MenuItem*)':
tcMenuLiquidCrystal.cpp:201:31: error: 'JUSTIFY_TEXT_RIGHT' was not declared in this scope
menuValueToText(item, JUSTIFY_TEXT_RIGHT);
^~~~~~~~~~~~~~~~~~
tcMenuLiquidCrystal.cpp:201:9: error: 'menuValueToText' was not declared in this scope
menuValueToText(item, JUSTIFY_TEXT_RIGHT); ^~~~~~~~~~~~~~~"
"
and then exists.

Can you please assist or advise what could be wrong?
Regards
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Did you choose the Uno option in the liquid crystal settings for code generator?
jacobez


Joined: Mar 21, 2021
Messages: 10
Offline
Hi Dave,
I did select the Uno. Both the Uno & Full give me the same error.
[Thumb - tcMenu JB 2 2022-12-17 144915.jpg]
 Filename tcMenu JB 2 2022-12-17 144915.jpg [Disk] Download
 Description No description given
 Filesize 113 Kbytes
 Downloaded:  129 time(s)

[Thumb - tcMenu JB 2022-12-17 144712.jpg]
 Filename tcMenu JB 2022-12-17 144712.jpg [Disk] Download
 Description No description given
 Filesize 101 Kbytes
 Downloaded:  131 time(s)

davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
It looks like you’re using a very old version of designer. Can you confirm which version you’re using and compare it against the last release on GitHub please.
jacobez


Joined: Mar 21, 2021
Messages: 10
Offline
Hi Dave,
Thanks for the note.
I've upgraded the Designer and built a basic menu for a DFR board installed on a Mega 2560 to test. I do however keep on getting the below error & even rolled back the tcMenu library to 2.4.
What could be the issue?

"C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp: In member function 'void MenuManager::performDirectionMove(bool)':
C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:57:78: error: no matching function for call to 'SwitchInput::changeEncoderPrecision(int, int&, int, bool)'
isWrapAroundEncoder(editableItem));
^
In file included from C:\..\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:306:0,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.h:9,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:7:
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint16_t, uint16_t)
void changeEncoderPrecision(uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(0, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate expects 2 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(slot, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate expects 3 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t, bool, int)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue, bool rollover, int step);
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate expects 5 arguments, 4 provided
C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp: In member function 'void MenuManager::stopEditingCurrentItem(bool)':
C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:206:78: error: no matching function for call to 'SwitchInput::changeEncoderPrecision(int, int&, int, bool)'
isWrapAroundEncoder(editableItem));
^
In file included from C:\..\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:306:0,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.h:9,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:7:
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint16_t, uint16_t)
void changeEncoderPrecision(uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(0, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate expects 2 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(slot, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate expects 3 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t, bool, int)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue, bool rollover, int step);
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate expects 5 arguments, 4 provided
C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp: In member function 'void MenuManager::setupForEditing(MenuItem*)':
C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:302:75: error: no matching function for call to 'SwitchInput::changeEncoderPrecision(int, uint16_t, int, bool)'
isWrapAroundEncoder(currentEditor));
^
In file included from C:\..\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:306:0,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.h:9,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:7:
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint16_t, uint16_t)
void changeEncoderPrecision(uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(0, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate expects 2 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(slot, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate expects 3 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t, bool, int)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue, bool rollover, int step);
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate expects 5 arguments, 4 provided
C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:309:107: error: no matching function for call to 'SwitchInput::changeEncoderPrecision(int, int&, int, menuid_t)'
switches.changeEncoderPrecision(0, range, editableItem->getPartValueAsInt(), editableItem->getId());
^
In file included from C:\..\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:306:0,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.h:9,
from C:\..\Arduino\libraries\tcMenu\src\tcMenu.cpp:7:
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint16_t, uint16_t)
void changeEncoderPrecision(uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(0, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:553:7: note: candidate expects 2 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue) { changeEncoderPrecision(slot, precision, currentValue, false, 1); }
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:563:10: note: candidate expects 3 arguments, 4 provided
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate: void SwitchInput::changeEncoderPrecision(uint8_t, uint16_t, uint16_t, bool, int)
void changeEncoderPrecision(uint8_t slot, uint16_t precision, uint16_t currentValue, bool rollover, int step);
^~~~~~~~~~~~~~~~~~~~~~
C:\..\Arduino\libraries\IoAbstraction\src/SwitchInput.h:575:7: note: candidate expects 5 arguments, 4 provided


 Filename JBtcMenuTestDFRobot.zip [Disk] Download
 Description No description given
 Filesize 7 Kbytes
 Downloaded:  113 time(s)

davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Please can you revert IoAbstraction to 3.0.0 until I have chance to release tcMenu 3.0 later today.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
https://github.com/davetcc/IoAbstraction/releases/tag/3.0.2 should make its way into arduino library manager later today and fix this issue. Mean time take IoAbstraction 3.0.0. Apologies for this and thanks for letting me know.
jacobez


Joined: Mar 21, 2021
Messages: 10
Offline
Thanks Dave,
I've done so, but now get the following error with the exact same file after regenerating the code on the Designer.
C:\ARDTemp\libraries\IoAbstraction\TextUtilities.cpp.o (symbol from plugin): In function `appendChar(char*, char, int)':
(.text+0x0): multiple definition of `appendChar(char*, char, int)'
C:\ARDTemp\libraries\tcMenu\tcUtil.cpp.o (symbol from plugin)smilie.text+0x0): first defined here
C:\ARDTemp\libraries\IoAbstraction\TextUtilities.cpp.o (symbol from plugin): In function `appendChar(char*, char, int)':
(.text+0x0): multiple definition of `dpToDivisor(int)'
C:\ARDTemp\libraries\tcMenu\tcUtil.cpp.o (symbol from plugin)smilie.text+0x0): first defined here
C:\ARDTemp\libraries\IoAbstraction\TextUtilities.cpp.o (symbol from plugin): In function `appendChar(char*, char, int)':
(.text+0x0): multiple definition of `valueToSignificantPlaces(unsigned long, bool)'
C:\ARDTemp\libraries\tcMenu\tcUtil.cpp.o (symbol from plugin)smilie.text+0x0): first defined here
C:\ARDTemp\libraries\IoAbstraction\TextUtilities.cpp.o (symbol from plugin): In function `appendChar(char*, char, int)':
(.text+0x0): multiple definition of `fastltoa_mv(char*, long, long, char, int)'
C:\ARDTemp\libraries\tcMenu\tcUtil.cpp.o (symbol from plugin)smilie.text+0x0): first defined here
C:\ARDTemp\libraries\IoAbstraction\TextUtilities.cpp.o (symbol from plugin): In function `appendChar(char*, char, int)':
(.text+0x0): multiple definition of `ltoaClrBuff(char*, long, unsigned char, char, int)'
C:\ARDTemp\libraries\tcMenu\tcUtil.cpp.o (symbol from plugin)smilie.text+0x0): first defined here
C:\ARDTemp\libraries\IoAbstraction\TextUtilities.cpp.o (symbol from plugin): In function `appendChar(char*, char, int)':
(.text+0x0): multiple definition of `fastltoa(char*, long, unsigned char, char, int)'
C:\ARDTemp\libraries\tcMenu\tcUtil.cpp.o (symbol from plugin)smilie.text+0x0): first defined here
C:\ARDTemp\libraries\IoAbstraction\TextUtilities.cpp.o (symbol from plugin): In function `appendChar(char*, char, int)':
(.text+0x0): multiple definition of `fastftoa(char*, float, int, int)'
C:\ARDTemp\libraries\tcMenu\tcUtil.cpp.o (symbol from plugin)smilie.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
For now go back to 2.4.3 of IoAbstraction and I'll release TcMenu 3.0 today.
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.