Qrome - added the ability to flip the rotation of the display

pull/14/head
Chrome Legion 2018-05-27 22:11:48 -07:00
parent 08335269d7
commit 4feb52b748
2 changed files with 8 additions and 1 deletions

View File

@ -69,6 +69,7 @@ boolean DISPLAYCLOCK = true; // true = Show Clock when not printing / false =
const int I2C_DISPLAY_ADDRESS = 0x3c; // I2C Address of your Display (usually 0x3c or 0x3d) const int I2C_DISPLAY_ADDRESS = 0x3c; // I2C Address of your Display (usually 0x3c or 0x3d)
const int SDA_PIN = D2; const int SDA_PIN = D2;
const int SCL_PIN = D5; const int SCL_PIN = D5;
const boolean INVERT_DISPLAY = false; // true = pins at top | false = pins at the bottom
//#define DISPLAY_SH1106 // Uncomment this line to use the SH1106 display -- SSD1306 is used by default and is most common //#define DISPLAY_SH1106 // Uncomment this line to use the SH1106 display -- SSD1306 is used by default and is most common
boolean ENABLE_OTA = true; // this will allow you to load firmware to the device over WiFi (see OTA for ESP8266) boolean ENABLE_OTA = true; // this will allow you to load firmware to the device over WiFi (see OTA for ESP8266)

View File

@ -27,7 +27,7 @@ SOFTWARE.
#include "Settings.h" #include "Settings.h"
#define VERSION "1.4" #define VERSION "1.5"
#define HOSTNAME "OctMon-" #define HOSTNAME "OctMon-"
#define CONFIG "/conf.txt" #define CONFIG "/conf.txt"
@ -154,6 +154,9 @@ void setup() {
// initialize dispaly // initialize dispaly
display.init(); display.init();
if (INVERT_DISPLAY) {
display.flipScreenVertically(); // connections at top of OLED display
}
display.clear(); display.clear();
display.display(); display.display();
@ -195,6 +198,9 @@ void setup() {
// Inital UI takes care of initalising the display too. // Inital UI takes care of initalising the display too.
ui.init(); ui.init();
if (INVERT_DISPLAY) {
display.flipScreenVertically(); //connections at top of OLED display
}
// print the received signal strength: // print the received signal strength:
Serial.print("Signal Strength (RSSI): "); Serial.print("Signal Strength (RSSI): ");