Skip to content

Commit

Permalink
Ham: keep green NeoPixel light off when 'No receive' option is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Aug 7, 2023
1 parent fe38a7f commit b7f69da
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 9 deletions.
Binary file added documents/images/ham-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documents/images/ham-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documents/images/midi-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion software/firmware/binaries/ESP32/SkyView/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,21 @@ Three more of [hardware platforms](https://github.com/lyusupov/SoftRF#by-process

### Known issues and limitations

TBD
* same that previous 0.12 release has, **plus**
* **RP2040:** PIO USB Host is kind of fragile and can cause issues when Wi-Fi or Bluetooth is active. When USB is your primary connection method - activate Wi-Fi 'power saving' feature to disable the Wi-Fi while it is not in use. When you use Wi-Fi of Bluetooth as a primary connection method - do NOT connect any device to the RP2040 PIO USB port ;
* **ESP32-S3**: pictore on the GDEY027T91 display may partially loose contrast after a sequence of screen updates. One should consider to activate [e-Paper 'ghosts' removal](https://github.com/lyusupov/SoftRF/wiki/SkyView-settings#e-paper-ghosts-removal) procedure as a workaroud.

### Flashing instructions

&nbsp;&nbsp;&nbsp;&nbsp;**ESP32:**<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'[Web Update](https://github.com/lyusupov/SoftRF/wiki/Firmware-update-%28Web-method%29#esp32)' method should work just fine when you are updating from **Regular** 0.12.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In case of troubles - use generic ('cable') method instead. Follow **Step 1** and **Step 2** of this [**Quick start**](https://github.com/lyusupov/SoftRF/wiki/SkyView.-Quick-start) guidance.<br>
&nbsp;&nbsp;&nbsp;&nbsp;**RP2040:**<br>
&nbsp;&nbsp;&nbsp;&nbsp;**ESP32-S3:**<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Both RP2040 and ESP32-S3 platforms can do firmware update over USB connection when the firmware binary is in UF2 format.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Follow **SkyView Pico** firmware installation procedure as explained on [this page](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pico.-Quick-start).<br>

<br>

## revision 0.12

Expand Down
15 changes: 13 additions & 2 deletions software/firmware/source/SoftRF/src/driver/RF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,9 @@ extern NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> TWR2_Pixel;
void sa868_Tx_LED_state(bool val) {
if (hw_info.model == SOFTRF_MODEL_HAM) {
#if defined(USE_NEOPIXELBUS_LIBRARY)
TWR2_Pixel.SetPixelColor(0, val ? LED_COLOR_RED : LED_COLOR_GREEN);
TWR2_Pixel.SetPixelColor(0, val ? LED_COLOR_RED :
settings->power_save & POWER_SAVE_NORECEIVE ?
LED_COLOR_BLACK : LED_COLOR_GREEN);
TWR2_Pixel.Show();
#endif /* USE_NEOPIXELBUS_LIBRARY */
}
Expand Down Expand Up @@ -2384,7 +2386,8 @@ static void sa8x8_setup()
}
}

controller.setGroup(0 /* TBD */, MHz, MHz, 0, 1, 0);
byte sq = settings->power_save & POWER_SAVE_NORECEIVE ? 8 : 1;
controller.setGroup(0 /* TBD */, MHz, MHz, 0, sq, 0);

if (controller.getModel() == Model::SA_868) {
aprs_preamble = 350UL * 3;
Expand All @@ -2409,6 +2412,14 @@ static void sa8x8_setup()
APRS_setTail(aprs_tail);
APRS_setSymbol('\'');

if (hw_info.model == SOFTRF_MODEL_HAM) {
#if defined(USE_NEOPIXELBUS_LIBRARY)
TWR2_Pixel.SetPixelColor(0, settings->power_save & POWER_SAVE_NORECEIVE ?
LED_COLOR_BLACK : LED_COLOR_GREEN);
TWR2_Pixel.Show();
#endif /* USE_NEOPIXELBUS_LIBRARY */
}

APRS_setTxLEDCallback(sa868_Tx_LED_state);

// You don't need to set the destination identifier, but
Expand Down
2 changes: 0 additions & 2 deletions software/firmware/source/SoftRF/src/platform/ESP32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,6 @@ static void ESP32_setup()
#if defined(USE_NEOPIXELBUS_LIBRARY)
TWR2_Pixel.Begin();
TWR2_Pixel.Show(); // Initialize all pixels to 'off'
TWR2_Pixel.SetPixelColor(0, LED_COLOR_GREEN);
TWR2_Pixel.Show();
#endif /* USE_NEOPIXELBUS_LIBRARY */
} else {
WIRE_FINI(Wire);
Expand Down
10 changes: 6 additions & 4 deletions software/firmware/source/SoftRF/src/protocol/radio/APRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,12 @@ size_t aprs_encode(void *pkt, ufo_t *this_aircraft) {
uint8_t addr_type = id == SOFTRF_ADDRESS ? ADDR_TYPE_ICAO : ADDR_TYPE_ANONYMOUS;
#endif

//snprintf(buf, sizeof(buf), "FLR%06X", id);
//APRS_setCallsign(buf, 0);
// snprintf(buf, sizeof(buf), "FLR%06X", id);
// snprintf(buf, sizeof(buf), "OGN%06X", id);
// APRS_setCallsign(buf, 0);

APRS_setDestination("OGNFLR", 0);
// APRS_setDestination("OGNFLR", 0);
APRS_setDestination("OGNTRK", 0);

// Let's first set our latitude and longtitude.
// These should be in NMEA format!
Expand Down Expand Up @@ -255,7 +257,7 @@ size_t aprs_encode(void *pkt, ufo_t *this_aircraft) {
(addr_type );

snprintf(Outgoing_APRS_Comment, sizeof(Outgoing_APRS_Comment),
"%03d/%03d/A=%06d !W00! id%08X",
"%03d/%03d/A=%06d !W00! id%08X +000fpm +0rot gps8x3",
(course_i == 0) ? 360 : course_i,
(int) this_aircraft->speed, /* knots */
(altitude_i < 0) ? 0 : altitude_i, /* feet */
Expand Down

0 comments on commit b7f69da

Please sign in to comment.