Comments (3)
Apparently that screen is 64x32 pixels? When it boots do you see 1/4th of the meshtastic logo? If so I would recommend the following next steps:
- In screen.cpp, wrap SCREEN_WIDTH and SCREEN_HEIGHT definitions with an #ifdef BOARD_MAKERHAWK (which you will also define in configuration.h, so we can eventually make this a standard supported board)
- For MAKERHAWK use 64x32 ;-)
- Change the following code in screen.cpp:
old code:
void drawFrameBluetooth(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
{
// Demonstrates the 3 included default sizes. The fonts come from SSD1306Fonts.h file
// Besides the default fonts there will be a program to convert TrueType fonts into this format
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_16);
display->drawString(64 + x, 2 + y, "Bluetooth");
display->setFont(ArialMT_Plain_10);
display->drawString(64 + x, SCREEN_HEIGHT - FONT_HEIGHT + y, "Enter this code");
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_24);
display->drawString(64 + x, 22 + y, btPIN);
ui.disableIndicator();
}
new code:
#ifdef BOARD_MAKERHAWK
// devices with tiny screens need to use tiny fonts
#define FONT_LARGEST ArialMT_Plain_10
#else
#define FONT_LARGEST ArialMT_Plain_24
#endif
void drawFrameBluetooth(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
{
DEBUG_MSG("Trying to pair bluetooth PIN %s\n", btPIN);
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_16);
display->drawString(SCREEN_WIDTH/2 + x, 2 + y, "Bluetooth");
display->setFont(ArialMT_Plain_10);
display->drawString(SCREEN_WIDTH/2 + x, SCREEN_HEIGHT - FONT_HEIGHT + y, "Enter this code");
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(FONT_LARGEST);
display->drawString(SCREEN_WIDTH / 2 + x, 22 + y, btPIN);
ui.disableIndicator();
}
^ this quick hacked up code is probably not exactly correct - but you can see changed my yucky absolute screen positions to be more relative to SCREEN_WIDTH. I also generalized the font selection so a tiny font is used on your device. Other functions in screen.cpp will probably also need to be tweaked to nicely look good on your device and the otehr devices. I also added a DEBUG_STR to print the pairing code to hte serial port so you can get past this point without the screen fully working.
I'm happy to help if you have more problems and I'd love a pull request once you have a nice clean set of changes needed to support your board.
from firmware.
@peoplesdriver - just checking in, did you ever do anything with this?
from firmware.
Ok - no word from @peoplesdriver - closing for now
from firmware.
Related Issues (20)
- [Bug]: multiple Typo ... mhz -> MHz HOT 1
- [Feature Request]: Expand compatibility with RAK WisBlock Sensor Modules HOT 1
- [Feature Request]: Cancel canned message with main button HOT 2
- Add semihosting to allow debug without USB/serial
- Implement PowerMon
- [Bug]: QMC5883L Has the wrong address in the config
- [Feature Request]: Identify log data that may need privacy redaction HOT 3
- [Feature Request]: Implement ESP32 BT / WiFi RF coexistance HOT 1
- Heltec Tracker v1.1 U6 wastes power HOT 19
- [Bug]: Battery info shows 0%
- [Feature Request]: some ideas for next releases ? HOT 1
- [Feature Request]: Do not retain MQTT 'stat' topic HOT 6
- [Bug]: store and forward chronology HOT 4
- [Bug]: T-Beam/Hydra (maybe more non-S3) OTA mode reboots quickly HOT 2
- [Bug]: Device becomes unreachable Heltec & LILYGO HOT 3
- [Bug]: Unexpected Crashes in Techo Firmware Versions 2.3.12 and 2.3.13 HOT 7
- 2.3.14 HOT 2
- Warnings generated during compilation HOT 3
- [Bug]: Occasionally restarting after sending message
- [Bug]: very long "long name" HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firmware.