fix memory leak - generate reed solomon table only once
This commit is contained in:
parent
04196347bb
commit
eb83c6f50f
|
|
@ -1002,7 +1002,7 @@ void initialMode() {
|
||||||
// 2: access point mode in background. directly start initial mode (spectrum or scanner)
|
// 2: access point mode in background. directly start initial mode (spectrum or scanner)
|
||||||
// 3: traditional sync. WifiScan. Tries to connect to a network, in case of failure activates AP.
|
// 3: traditional sync. WifiScan. Tries to connect to a network, in case of failure activates AP.
|
||||||
// Mode 3 shows more debug information on serial port and display.
|
// Mode 3 shows more debug information on serial port and display.
|
||||||
static char* _scan[2] = {"/", "\\"};
|
static const char* _scan[2] = {"/", "\\"};
|
||||||
void loopWifiScan() {
|
void loopWifiScan() {
|
||||||
if (sonde.config.wifi == 0) { // no Wifi
|
if (sonde.config.wifi == 0) { // no Wifi
|
||||||
wifi_state = WIFI_DISABLED;
|
wifi_state = WIFI_DISABLED;
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,11 @@ int RS41::setup()
|
||||||
#if RS41_DEBUG
|
#if RS41_DEBUG
|
||||||
Serial.println("Setup sx1278 for RS41 sonde");
|
Serial.println("Setup sx1278 for RS41 sonde");
|
||||||
#endif
|
#endif
|
||||||
Gencrctab();
|
if(!initialized) {
|
||||||
initrsc();
|
Gencrctab();
|
||||||
|
initrsc();
|
||||||
|
initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
if(sx1278.ON()!=0) {
|
if(sx1278.ON()!=0) {
|
||||||
RS41_DBG(Serial.println("Setting SX1278 power on FAILED"));
|
RS41_DBG(Serial.println("Setting SX1278 power on FAILED"));
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ private:
|
||||||
{ 1, 1, 1, 0, 0, 0, 0, 1}};
|
{ 1, 1, 1, 0, 0, 0, 0, 1}};
|
||||||
uint8_t He[8] = { 0x7, 0xB, 0xD, 0xE, 0x8, 0x4, 0x2, 0x1}; // Spalten von H:
|
uint8_t He[8] = { 0x7, 0xB, 0xD, 0xE, 0x8, 0x4, 0x2, 0x1}; // Spalten von H:
|
||||||
// 1-bit-error-Syndrome
|
// 1-bit-error-Syndrome
|
||||||
|
boolean initialized = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RS41();
|
RS41();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue