U8x8 seems to be working much better. Smaller memory and flash requirements
This commit is contained in:
2
.vscode/arduino.json
vendored
2
.vscode/arduino.json
vendored
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"board": "bsfrance:avr:lora32u4",
|
"board": "bsfrance:avr:lora32u4",
|
||||||
"sketch": "crossbow/crossbow.ino",
|
"sketch": "crossbow/crossbow.ino",
|
||||||
"port": "COM7",
|
"port": "COM5",
|
||||||
"output": "../build"
|
"output": "../build"
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
#define FEATURE_TX_INPUT_SBUS
|
#define FEATURE_TX_INPUT_SBUS
|
||||||
|
|
||||||
// #define DEBUG_SERIAL
|
#define DEBUG_SERIAL
|
||||||
// #define DEBUG_PING_PONG
|
// #define DEBUG_PING_PONG
|
||||||
// #define DEBUG_LED
|
// #define DEBUG_LED
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "tx_oled.h"
|
#include "tx_oled.h"
|
||||||
|
|
||||||
|
#define OLED_COL_COUNT 16
|
||||||
|
|
||||||
TxOled::TxOled(void) {
|
TxOled::TxOled(void) {
|
||||||
U8X8_SSD1306_128X64_NONAME_HW_I2C _display(U8X8_PIN_NONE);
|
U8X8_SSD1306_128X64_NONAME_HW_I2C _display(U8X8_PIN_NONE);
|
||||||
}
|
}
|
||||||
@@ -7,8 +9,6 @@ TxOled::TxOled(void) {
|
|||||||
void TxOled::init() {
|
void TxOled::init() {
|
||||||
_display.begin();
|
_display.begin();
|
||||||
_display.clear();
|
_display.clear();
|
||||||
_display.setFont(u8x8_font_chroma48medium8_r);
|
|
||||||
_display.drawString(0,0,"Hello World!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TxOled::loop() {
|
void TxOled::loop() {
|
||||||
@@ -150,43 +150,29 @@ void TxOled::renderPageStats() {
|
|||||||
|
|
||||||
void TxOled::renderPageInit() {
|
void TxOled::renderPageInit() {
|
||||||
|
|
||||||
|
char buf[OLED_COL_COUNT];
|
||||||
|
|
||||||
_display.clear();
|
_display.clear();
|
||||||
|
|
||||||
char buf[128];
|
_display.setFont(u8x8_font_pxplustandynewtv_f);
|
||||||
snprintf(buf, "%s %d %s", "Rdy", radioNode.loraTxPower, "dBm");
|
|
||||||
|
|
||||||
|
snprintf(buf, OLED_COL_COUNT, "Rdy %d %s", radioNode.loraTxPower, "dBm");
|
||||||
_display.drawString(0, 0, buf);
|
_display.drawString(0, 0, buf);
|
||||||
|
|
||||||
|
_display.setFont(u8x8_font_chroma48medium8_r);
|
||||||
|
|
||||||
// _display.clearDisplay();
|
snprintf(buf, OLED_COL_COUNT, "BW %dkHz", radioNode.loraBandwidth / 1000);
|
||||||
// _display.setTextColor(WHITE, BLACK);
|
_display.drawString(0, 3, buf);
|
||||||
// _display.setTextSize(2);
|
|
||||||
|
|
||||||
// _display.setCursor(0, 0);
|
snprintf(buf, OLED_COL_COUNT, "SF %d", radioNode.loraSpreadingFactor);
|
||||||
// _display.print("Rdy ");
|
_display.drawString(0, 4, buf);
|
||||||
// _display.print(radioNode.loraTxPower);
|
|
||||||
// _display.print("dBm");
|
|
||||||
|
|
||||||
// _display.setTextSize(1);
|
snprintf(buf, OLED_COL_COUNT, "CR %d", radioNode.loraCodingRate);
|
||||||
// _display.setCursor(0, 32);
|
_display.drawString(8, 4, buf);
|
||||||
// _display.print("Bandwitdh: ");
|
|
||||||
// _display.print(radioNode.loraBandwidth / 1000);
|
|
||||||
// _display.print("kHz");
|
|
||||||
|
|
||||||
// _display.setCursor(0, 42);
|
|
||||||
// _display.print("SF: ");
|
|
||||||
// _display.print(radioNode.loraSpreadingFactor);
|
|
||||||
|
|
||||||
// _display.setCursor(64, 42);
|
snprintf(buf, OLED_COL_COUNT, "Rate: %dHz", 1000 / TX_TRANSMIT_SLOT_RATE);
|
||||||
// _display.print("CR: ");
|
_display.drawString(0, 6, buf);
|
||||||
// _display.print(radioNode.loraCodingRate);
|
|
||||||
|
|
||||||
// _display.setCursor(0, 52);
|
|
||||||
// _display.print("Rate: ");
|
|
||||||
// _display.print(1000 / TX_TRANSMIT_SLOT_RATE);
|
|
||||||
// _display.print("Hz");
|
|
||||||
|
|
||||||
// _display.display();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user