Skip to content

Commit f8446bf

Browse files
committed
Prepare for next release
1 parent 4136e7c commit f8446bf

File tree

8 files changed

+20
-18
lines changed

8 files changed

+20
-18
lines changed

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": 1584202435,
3+
"seconds": 1584888681,
44
"nanos": 0
55
},
66
"codeOptions": {

examples/colorTftEthernet32/colorTftEthernet32.ino

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <AnalogDeviceAbstraction.h>
55
#include <RemoteAuthentication.h>
66
#include <RemoteMenuItem.h>
7-
#include <Fonts/FreeSans18pt7b.h>
87
#include <Fonts/FreeSans9pt7b.h>
98
#include <Ethernet.h>
109

@@ -22,8 +21,11 @@ byte mac[] = {
2221
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
2322
};
2423

25-
// we set up a TFT display first using the exact graphics variable used in the designer.
26-
Adafruit_ILI9341 gfx(6, 7);
24+
#define TFT_CS 6
25+
#define TFT_RST 3
26+
#define TFT_DC 7
27+
28+
Adafruit_ST7735 gfx = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
2729

2830
// we also want to customise the colours and menu spacing. So we create this config object too
2931
// which we initialise during the setup method.
@@ -56,20 +58,20 @@ EepromAuthenicationInfoMenuItem menuAuthKeyMgr(1002, &authManager, &menuRemoteMo
5658
void prepareCustomConfiguration() {
5759
// first we set the spacing around title, items and widgets. The make padding function follows the
5860
// same standard as CSS. Top, right, bottom, left.
59-
makePadding(colorConfig.titlePadding, 12, 5, 12, 5); // top, right, bottom & left
60-
makePadding(colorConfig.itemPadding, 5, 3, 6, 5); // top, right, bottom & left
61-
makePadding(colorConfig.widgetPadding, 5, 10, 0, 5);// top, right, bottom & left
61+
makePadding(colorConfig.titlePadding, 6, 3, 6, 3); // top, right, bottom & left
62+
makePadding(colorConfig.itemPadding, 3, 3, 3, 3); // top, right, bottom & left
63+
makePadding(colorConfig.widgetPadding, 3, 8, 0, 3);// top, right, bottom & left
6264

6365
// and then the foreground, background and font of the title
6466
colorConfig.bgTitleColor = RGB(50, 100, 200);
6567
colorConfig.fgTitleColor = RGB(0, 0, 0);
66-
colorConfig.titleFont = &FreeSans18pt7b;
68+
colorConfig.titleFont = &FreeSans9pt7b;
6769
colorConfig.titleBottomMargin = 10; // the space between title and items.
6870

6971
// and then the colours for items.
7072
colorConfig.bgItemColor = RGB(0, 0, 0);
7173
colorConfig.fgItemColor = RGB(222, 222, 222);
72-
colorConfig.itemFont = &FreeSans9pt7b;
74+
colorConfig.itemFont = NULL;
7375

7476
// and when items are selected.
7577
colorConfig.bgSelectColor = RGB(0, 50, 200);
@@ -92,8 +94,8 @@ void prepareCustomConfiguration() {
9294

9395
void setup() {
9496
// we are responsible for setting up the initial graphics
95-
gfx.begin();
96-
gfx.setRotation(3);
97+
gfx.initR(INITR_BLACKTAB);
98+
gfx.setRotation(1);
9799

98100
// we used an i2c device (io8574) so must initialise wire too
99101
Wire.begin();

examples/colorTftEthernet32/colorTftEthernet32_menu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <tcMenu.h>
1515
#include <RuntimeMenuItem.h>
1616
#include "Adafruit_GFX.h"
17-
#include "Adafruit_ILI9341.h"
17+
#include "Adafruit_ST7735.h"
1818
#include "tcMenuAdaFruitGfx.h"
1919
#include "EthernetTransport.h"
2020
#include <RemoteConnector.h>
@@ -24,7 +24,7 @@ extern const PROGMEM ConnectorLocalInfo applicationInfo; // defines the app inf
2424

2525
// Global variables that need exporting
2626

27-
extern Adafruit_ILI9341 gfx;
27+
extern Adafruit_ST7735 gfx;
2828
extern AdaColorGfxMenuConfig colorConfig;
2929
extern AdaFruitGfxMenuRenderer renderer;
3030
extern IoAbstractionRef io8574;

examples/colorTftEthernet32/tcMenuAdaFruitGfx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extern const ConnectorLocalInfo applicationInfo;
1919
int drawingCount = 0;
2020

2121
#if DISPLAY_HAS_MEMBUFFER == true
22-
#define refreshDisplayIfNeeded(gr, needUpd) {if(needUpd) reinterpret_cast<Adafruit_ILI9341*>(gr)->display();}
22+
#define refreshDisplayIfNeeded(gr, needUpd) {if(needUpd) reinterpret_cast<Adafruit_ST7735*>(gr)->display();}
2323
#else
2424
#define refreshDisplayIfNeeded(g, n)
2525
#endif

examples/colorTftEthernet32/tcMenuAdaFruitGfx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <tcUtil.h>
2323
#include <BaseRenderers.h>
2424
#include <Adafruit_GFX.h>
25-
#include <Adafruit_ILI9341.h>
25+
#include <Adafruit_ST7735.h>
2626
#include <gfxfont.h>
2727
#include <GfxMenuConfig.h>
2828
#include <BaseDialog.h>

examples/esp8266WifiOled/EthernetTransport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int EthernetTagValTransport::writeStr(const char* data) {
4949
int i = 0;
5050
int len = strlen(data);
5151
for(int i = 0; i < len; ++i) {
52-
if(write(data[i]) == 0) {
52+
if(writeChar(data[i]) == 0) {
5353
return 0;
5454
}
5555
}

examples/esp8266WifiOled/Greenhouse.emf

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

examples/simpleJoystickLcd/simpleJoystick.emf

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

0 commit comments

Comments
 (0)