Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: innovationgarage/TTyGO
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.0.2
Choose a base ref
...
head repository: innovationgarage/TTyGO
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Nov 21, 2019

  1. Turn off wifi on the ESP8266

    eried committed Nov 21, 2019
    Copy the full SHA
    ebd8009 View commit details
  2. Update TTyGO.ino

    eried committed Nov 21, 2019
    Copy the full SHA
    5e56226 View commit details
  3. Version bump

    eried committed Nov 21, 2019
    Copy the full SHA
    3c639cc View commit details
  4. Removing dot from version

    eried committed Nov 21, 2019
    Copy the full SHA
    a5cdadc View commit details
Showing with 26 additions and 7 deletions.
  1. +1 −1 TTyGO/Mode.ino
  2. +17 −4 TTyGO/Setup.ino
  3. +2 −1 TTyGO/TTyGO.ino
  4. +3 −1 TTyGO/config.h
  5. +3 −0 TTyGO/config.ttgo.h
2 changes: 1 addition & 1 deletion TTyGO/Mode.ino
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ State initial_state(char c) {
current_cursor.x = 1;
return (State) &initial_state;
case '\x5': // ENQ (enquiry)
Serial.print(S("TTyGO v.0.0.1"));
Serial.print(S("TTyGO v" VERSION));
return (State) &initial_state;
case '\x9': // TAB (horizontal tab)
terminal_cursor_move_to_tab(1);
21 changes: 17 additions & 4 deletions TTyGO/Setup.ino
Original file line number Diff line number Diff line change
@@ -2,12 +2,25 @@ void loop(void) {
/* Nothing here, check Setup.ino */
}

// From: https://github.com/esp8266/Arduino/issues/644#issuecomment-246164948
void stopWiFiAndSleep()
{
WiFi.disconnect();
WiFi.mode(WIFI_OFF);
WiFi.forceSleepBegin();
delay(1);
}

void setup(void)
{
#ifdef ESPI2C
// change hardware I2C pins to (5,4) (D1,D2)
Wire.begin(LCD_CLK, LCD_SDA);
#endif
#if TURN_OFF_WIFI_STARTUP > 0
stopWiFiAndSleep();
#endif

#ifdef ESPI2C
// change hardware I2C pins to (5,4) (D1,D2)
Wire.begin(LCD_CLK, LCD_SDA);
#endif

/* Start the serial port already here so that debug prints work even
during startup of non-serial tasks... */
3 changes: 2 additions & 1 deletion TTyGO/TTyGO.ino
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#define VERSION "0.0.2"
#define VERSION "0.1.0"

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)

#include <ESP8266WiFi.h>
#include "config.h"
#include <U8g2lib.h>
#include <Wire.h>
4 changes: 3 additions & 1 deletion TTyGO/config.h
Original file line number Diff line number Diff line change
@@ -64,7 +64,9 @@

#define str(s) str2(s)
#define str2(s) #s
#define TERMINAL_INIT_BANNER "\x1bc\x1b[1;1HTTyGO v." VERSION " " str(SERIAL_BAUDS) "bps\nVT220" WIDECHARSTR " for Arduino\nBy InnovationGarage AS\n" BANNER
#define TERMINAL_INIT_BANNER "\x1bc\x1b[1;1HTTyGO v" VERSION " " str(SERIAL_BAUDS) "bps\nVT220" WIDECHARSTR " for Arduino\nBy InnovationGarage AS\n" BANNER

#define TURN_OFF_WIFI_STARTUP DEFAULT_TURN_OFF_WIFI_STARTUP

// Set to 1 to enable the DEC special character set (drawing characters)
// Note that you must use a font that supports this too for this to work.
3 changes: 3 additions & 0 deletions TTyGO/config.ttgo.h
Original file line number Diff line number Diff line change
@@ -33,6 +33,9 @@
// Comment the line below to use the "fake" scheduler
#define USE_ESP8266SCHEDULER

// Turns off wifi at ESP start
#define DEFAULT_TURN_OFF_WIFI_STARTUP 1

// ESP uses software I2C that needs configuring at startup
#define ESPI2C