|
|
@ -3,11 +3,6 @@ |
|
|
|
* Manual - https://www.seeedstudio.com/blog/2019/07/05/u8g2-for-seeeduino-boards/
|
|
|
|
* Dual OLED - https://github.com/olikraus/u8g2/issues/77
|
|
|
|
* |
|
|
|
* TODO: |
|
|
|
* [ ] - Binding with receiver |
|
|
|
* [ ] - HostAP for the receiver to bind |
|
|
|
* [ ] - Changing transmission code |
|
|
|
* |
|
|
|
* Every power cycle: |
|
|
|
* 1. Read configuration from EEPROM |
|
|
|
* |
|
|
@ -412,7 +407,7 @@ void setup_webserver(void) { |
|
|
|
/*** Index Page ***/ |
|
|
|
server.on("/", HTTP_GET, []() { |
|
|
|
server.sendHeader("Connection", "close"); |
|
|
|
server.send(200, "text/html", index_html); |
|
|
|
server.send(200, "text/html", firmware_upgrade_html); |
|
|
|
}); |
|
|
|
|
|
|
|
/*** Firmware Upgrade Page ***/ |
|
|
@ -1531,6 +1526,10 @@ void rc_controller(void) { |
|
|
|
// u8g2_right.drawFilledEllipse(gimbal_x, gimbal_y, 3, 3, U8G2_DRAW_ALL);
|
|
|
|
u8g2_left.drawFilledEllipse(90 + gimbal_x, 31 + gimbal_y, 2, 2, U8G2_DRAW_ALL); |
|
|
|
|
|
|
|
// Calculate uptime
|
|
|
|
int hours = uptime / 3600; |
|
|
|
int minutes = uptime / 60; |
|
|
|
int seconds = uptime % 60; |
|
|
|
|
|
|
|
u8g2_left.setFont(u8g2_font_5x7_tf); |
|
|
|
sprintf(buf, "%d packets/s", nrf_profiling); |
|
|
@ -1538,6 +1537,9 @@ void rc_controller(void) { |
|
|
|
sprintf(buf, "%d MHz", freq_channel + 2400); |
|
|
|
u8g2_left.drawStr(0, 32, buf); |
|
|
|
|
|
|
|
sprintf(buf, "%02d:%02d:%02d", hours, minutes, seconds); |
|
|
|
u8g2_left.drawStr(84, 24, buf); |
|
|
|
|
|
|
|
switch(freq_txpower) { |
|
|
|
case 0: |
|
|
|
sprintf(buf, "TX MIN"); |
|
|
|