Skip to content

Commit b46c1cd

Browse files
author
dave
committed
#71, #70 Analog and Large number support work properly with all ranges of numbers.
Especially when using the get and set methods to set them to new values. Unit tests completely refactored and improved.
1 parent 436aaae commit b46c1cd

33 files changed

+1123
-749
lines changed

examples/analogDfRobot/analogDfRobot.emf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lastEdited": {
3-
"seconds": 1589213417,
3+
"seconds": 1598353259,
44
"nanos": 0
55
},
66
"codeOptions": {
@@ -9,7 +9,7 @@
99
"lastInputUuid": "7daa6a81-dd09-422e-b83c-bda5045abaef",
1010
"lastDisplayUuid": "bcd5fe34-9e9f-4fcb-9edf-f4e3caca0674",
1111
"lastRemoteUuid": "2c101fec-1f7d-4ff3-8d2b-992ad41e7fcb",
12-
"embeddedPlatform": "ARDUINO_AVR",
12+
"embeddedPlatform": "ARDUINO_UNO",
1313
"namingRecursive": false,
1414
"saveToSrc": false,
1515
"lastProperties": []

examples/analogDfRobot/analogDfRobot.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* This example assumes you've got an Uno / MEGA with the DF robot board. It uses a the switches that are connected to
3+
* analog 0 and tries to keep as much in line with the DF robot spec as possible.
4+
* See the readme file for more info.
5+
*/
16
#include "analogDfRobot_menu.h"
27

38
void setup() {

examples/analogDfRobot/analogDfRobot_menu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use elsewhere.
99
*/
1010

11+
#include <Arduino.h>
1112
#include <tcMenu.h>
1213
#include "analogDfRobot_menu.h"
1314

examples/analogDfRobot/analogDfRobot_menu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef MENU_GENERATED_CODE_H
1212
#define MENU_GENERATED_CODE_H
1313

14+
#include <Arduino.h>
1415
#include <tcMenu.h>
1516
#include <RuntimeMenuItem.h>
1617
#include <LiquidCrystalIO.h>

examples/colorTftEthernet32/colorTftEthernet.emf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lastEdited": {
3-
"seconds": 1589220779,
3+
"seconds": 1598353677,
44
"nanos": 0
55
},
66
"codeOptions": {

examples/colorTftEthernet32/colorTftEthernet32_menu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use elsewhere.
99
*/
1010

11+
#include <Arduino.h>
1112
#include <tcMenu.h>
1213
#include "colorTftEthernet32_menu.h"
1314

examples/colorTftEthernet32/colorTftEthernet32_menu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef MENU_GENERATED_CODE_H
1212
#define MENU_GENERATED_CODE_H
1313

14+
#include <Arduino.h>
1415
#include <tcMenu.h>
1516
#include <RuntimeMenuItem.h>
1617
#include "Adafruit_GFX.h"

examples/keyboardEthernetShield/keyboardEthernetShield.emf

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lastEdited": {
3-
"seconds": 1589221513,
3+
"seconds": 1598353698,
44
"nanos": 0
55
},
66
"codeOptions": {
@@ -13,6 +13,36 @@
1313
"namingRecursive": true,
1414
"saveToSrc": false,
1515
"lastProperties": [
16+
{
17+
"name": "PULLUP_LOGIC",
18+
"latestValue": "true",
19+
"subsystem": "INPUT"
20+
},
21+
{
22+
"name": "INTERRUPT_SWITCHES",
23+
"latestValue": "false",
24+
"subsystem": "INPUT"
25+
},
26+
{
27+
"name": "SWITCH_IODEVICE",
28+
"latestValue": "io23017",
29+
"subsystem": "INPUT"
30+
},
31+
{
32+
"name": "ENCODER_PIN_A",
33+
"latestValue": "6",
34+
"subsystem": "INPUT"
35+
},
36+
{
37+
"name": "ENCODER_PIN_B",
38+
"latestValue": "7",
39+
"subsystem": "INPUT"
40+
},
41+
{
42+
"name": "ENCODER_PIN_OK",
43+
"latestValue": "5",
44+
"subsystem": "INPUT"
45+
},
1646
{
1747
"name": "LCD_WIDTH",
1848
"latestValue": "20",
@@ -68,36 +98,6 @@
6898
"latestValue": "io23017",
6999
"subsystem": "DISPLAY"
70100
},
71-
{
72-
"name": "PULLUP_LOGIC",
73-
"latestValue": "true",
74-
"subsystem": "INPUT"
75-
},
76-
{
77-
"name": "INTERRUPT_SWITCHES",
78-
"latestValue": "false",
79-
"subsystem": "INPUT"
80-
},
81-
{
82-
"name": "SWITCH_IODEVICE",
83-
"latestValue": "io23017",
84-
"subsystem": "INPUT"
85-
},
86-
{
87-
"name": "ENCODER_PIN_A",
88-
"latestValue": "6",
89-
"subsystem": "INPUT"
90-
},
91-
{
92-
"name": "ENCODER_PIN_B",
93-
"latestValue": "7",
94-
"subsystem": "INPUT"
95-
},
96-
{
97-
"name": "ENCODER_PIN_OK",
98-
"latestValue": "5",
99-
"subsystem": "INPUT"
100-
},
101101
{
102102
"name": "LIBRARY_TYPE",
103103
"latestValue": "ETHERNET_2",

examples/keyboardEthernetShield/keyboardEthernetShield.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <KeyboardManager.h>
66
#include <tcMenuKeyboard.h>
77
#include <EepromAbstraction.h>
8+
#include <Ethernet.h>
89

910
// Set up ethernet, the usual default settings are chosen. Change to your preferred values or use DHCP.
1011
byte mac[] = {
@@ -115,6 +116,8 @@ void setup() {
115116
authManager.copyPinToBuffer(sz, sizeof(sz));
116117
menuConnectivityChangePin.setTextValue(sz);
117118
menuConnectivityChangePin.setPasswordField(true);
119+
120+
menuLargeNum.getLargeNumber()->setFromFloat(1234.567);
118121
}
119122

120123
void loop() {

examples/keyboardEthernetShield/keyboardEthernetShield_menu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use elsewhere.
99
*/
1010

11+
#include <Arduino.h>
1112
#include <tcMenu.h>
1213
#include "keyboardEthernetShield_menu.h"
1314

0 commit comments

Comments
 (0)