fix memory leak - generate reed solomon table only once

ims100
Hans P. Reiser 2019-04-28 16:27:36 +02:00
rodzic 04196347bb
commit eb83c6f50f
3 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -1002,7 +1002,7 @@ void initialMode() {
// 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.
// Mode 3 shows more debug information on serial port and display.
static char* _scan[2] = {"/", "\\"};
static const char* _scan[2] = {"/", "\\"};
void loopWifiScan() {
if (sonde.config.wifi == 0) { // no Wifi
wifi_state = WIFI_DISABLED;

Wyświetl plik

@ -74,8 +74,11 @@ int RS41::setup()
#if RS41_DEBUG
Serial.println("Setup sx1278 for RS41 sonde");
#endif
Gencrctab();
initrsc();
if(!initialized) {
Gencrctab();
initrsc();
initialized = true;
}
if(sx1278.ON()!=0) {
RS41_DBG(Serial.println("Setting SX1278 power on FAILED"));

Wyświetl plik

@ -42,6 +42,7 @@ private:
{ 1, 1, 1, 0, 0, 0, 0, 1}};
uint8_t He[8] = { 0x7, 0xB, 0xD, 0xE, 0x8, 0x4, 0x2, 0x1}; // Spalten von H:
// 1-bit-error-Syndrome
boolean initialized = false;
public:
RS41();