1

Topic: 1 edit field decides whether it works?

The two parameter inputs shown differ only in an additional edit field. If I add one more field, the program stops working.

http://salefix.de/OK.jpg


It works!



http://salefix.de/NOK.jpg

This doesn't work?



Does anyone have any idea why an additional edit field can cause the program to stop working?

It would be great if someone could help me.

2

Re: 1 edit field decides whether it works?

Show the code

3 (edited by Günni 2020-06-19 04:56:20)

Re: 1 edit field decides whether it works?

// ************* SIMULATION ESP ****************

//    **** EINGANGSSIGNALE ****
// A0  - Gaspedal-Potentiometer
// A1  - Lenkwinkeleingabe-Potentiometer

// A2  - Leistungsbegrenzung
// A3  - Poti Reibungsbeiwert

// A4  - Bremsdrucksensor Rad von/links
// A5  - Bremsdrucksensor Rad von/rechts
// A6  - Bremsdrucksensor Rad hinten/links
// A7  - Bremsdrucksensor Rad hinten/rechts
//
// D23  - Bremspedalschalter
// D25  - Störgröße Übersteuern  wenig
// D27  - Störgröße Übersteuern  viel
// D29  - Störgröße Untersteuern wenig
// D31  - Störgröße Untersteuern viel
// D33  - Störgröße Querbeschleunigung wenig
// D35  - Störgröße Querbeschleunigung viel
//
// **** AUSGANGSSIGNALE ***
// TX1 = Rad vorn/links
// TX2 = Rad vorn/rechts
// TX3 = Rad hinten/links
// TX4 = Rad hinten/rechts Digital 3
// TX5 = Gierratenanzeige  Digital 5
// TX6 = ASR-Eingriff      Digital 7

// DA8  = PWM Fahrgeschwindigkeit 0-5 Volt (OP-Impedanzwandler)
// DA11 = PWM Gierratensignal     0-5 Volt (OP-Impedanzwandler)
// DA12 = PWM Querbeschleunigung  0-5 Volt (OP-Impedanzwandler)

float SF      = 0;      // Schlupffaktor beim Bremsen
float BKVR    = 0;      // Bremskraft errechnet vorn/rechts
float BKVL    = 0;      // Bremskraft errechnet vorn/links
float BKHR    = 0;      // Bremskraft errechnet hinten/rechts
float BKHL    = 0;      // Bremskraft errechnet hinten/links
float BKMAX   = 0;      // maximale Brems-/Beschleunigungskraft pro Rad
float SCHLUVR = 0;      // Radschlupf gerechnet vorn/rechts
float SCHLUVL = 0;      // Radschlupf gerechnet vorn/links
float SCHLUHR = 0;      // Radschlupf gerechnet hinten/rechts
float SCHLUHL = 0;      // Radschlupf gerechnet hinten/links
float FSPEED  = 0;      // Fahrgeschwindigkeit des Fahrzeuges
float VRS     = 0;      // Radgeschwindigkeit Antriebsrad vorn/rechts
float VLS     = 0;      // Radgeschwindigkeit Antriebsrad vorn/links
float VHRS    = 0;      // Radgeschwindigkeit Antriebsrad hinten/rechts
float VHLS    = 0;      // Radgeschwindigkeit Antriebsrad hinten/links
float FRAUS   = 0;      // Brems-/Antriebskraft resultierend vorn/rechts
float FLAUS   = 0;      // Brems-/Antriebskraft resultierend vorn/links
float FHRAUS  = 0;      // Bremskraft resultierend hinten/rechts
float FHLAUS  = 0;      // Bremskraft resultierend hinten/links
float FGAUS   = 0;      // Gesamtbrems-/Antriebskraft zur Fahrzeugverzögerung/Beschleunigung
float FL      = 0;      // Luftwiderstand
float FR      = 0;      // Rollwiderstand
float FEIN    = 0;      // Antriebskraft pro Rad der Antriebsachse
float EDSR    = 0;      // Schlupfeingriff EDS rechts
float EDSL    = 0;      // Schlupfeingriff EDS links
float ASHR    = 0;      // Schlupffaktor für gschleppte Hinterräder
float VMAX    = 27;     // maximale Fahrzeug- NICHT Radgeschwindigkeit in m/s²
float SPFAK   = 0;      // Abzugswert zur Reduzierung der Motorleistung
float MY      = 0.6;    // Reibungsbeiwert Straße / Reifen später durch Poti einstellbar
float BDVL    = 0;      // Bremsdruck vorn/links
float BDVR    = 0;      // Bremsdruck vorn/rechts
float BDHL    = 0;      // Bremsdruck hinten/links
float BDHR    = 0;      // Bremsdruck hinten/rechts
float BFAK    = 0;      // Bremsenkennwert
float FMASSE  = 1500;   // Fahrzeugmasse in kg
float AROU    = 0;      // Abrollradius Reifen in Meter
float ZZS     = 40;     // Zahnzahl Sensorrad für Drehzahlsensor
float RFAK    = 0;      // Propfaktor m/s -> Sensorfrequenz
float FA      = 0;      // resultierender Beschleunigungswert
float DV      = 0;      // Geschwindigkeits Inkre-/Dekrement
float dez     = 0;      // Dezimalwert für 2 Byte-Übergabe
float SPEEFA  = 0;      // Faktor zur Umrechnung von m/s->km/h->0-255 PWM
int hwb       = 0;      // höherwertiges  Byte
int nwb       = 0;      // niederwertiges Byte
int   BREM    = 0;      // Signal vom Bremsschalter Bremsung ja/nein

byte svr=0;             // Bytewerte serielle Übertragung vorn/rechts
byte svl=0;             // Bytewerte serielle Übertragung vorn/links
byte shr=0;             // Bytewerte serielle Übertragung hinten/rechts
byte shl=0;             // Bytewerte serielle Übertragung hinten/links
byte sgr=0;             // Bytewerte serielle Übertragung Gierrate
byte sgp=0;             // Bytewerte serielle Übertragung Motorleistung
int  squ=0;             // V24-Sendesquenz
int spbt=0;             // Verriegelung Speicherung Parameter
int npbt=0;             // Verriegelung Nullpunkt setzen

float lwlr=0;           // Lenkwinkel des Lenkrader   
int   drtg=0;           // Drehrichtungs Gierratenanzeige auf Frontplatte
float kr=0;             // Kurvenradius aus Lenkwinkel
float drte=0;           // Drehrate Fahrzeug um Hochachse
float strr=0;           // Störgröße Drehrate
int   gagw=0;           // Ausgabewert für analoge Gierrate 0-255 / 0°/s bei 128
float qb=0;             // Querbeschleunigung m/s²
float strs=0;           // Störgröße Querbeschleunigung
int   qagw=0;           // Ausgabewert für analoge Querbeschleunigung 0-255
int   fgkt=0;           // Ausgabewert für Fahrgeschwindigkeit
int aspo=0;




// Spannung/Drehrate analoger Gierratensensor
//  0 °/s  = 2,50 Volt
// 10 °/s  = 2,25 Volt rechts
// 20 °/s  = 1,95 Volt rechts
// 20 °/s  = 3,00 Volt links
// 10 °/s  = 2,75 Volt links

float LWSN = 0;          // Lenkwinkel +/- aud Potiwert und Propfaktor

unsigned long ZEIT  = 0;
unsigned long AZEIT = 0;

#include <SoftwareSerial.h>
#include <EEPROM.h> 

#define REMOTEXY_MODE__ESP8266_HARDSERIAL_POINT

#include <RemoteXY.h>

#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600 // 115200
#define REMOTEXY_WIFI_SSID "ABS"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377


// RemoteXY configurate 
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,97,0,166,0,146,6,10,13,4,
  67,5,8,13,20,5,1,8,16,11,
  67,5,71,13,20,5,1,8,16,11,
  67,5,8,44,20,5,1,8,16,11,
  67,5,71,44,20,5,1,8,16,11,
  131,1,1,2,21,5,1,2,31,83,
  116,97,114,116,0,129,0,11,9,15,
  3,1,8,86,111,114,110,47,108,105,
  110,107,115,0,129,0,73,9,17,3,
  1,8,86,111,114,110,47,114,101,99,
  104,116,115,0,129,0,10,40,18,3,
  1,8,72,105,110,116,101,110,47,108,
  105,110,107,115,0,129,0,71,40,20,
  3,1,8,72,105,110,116,101,110,47,
  114,101,99,104,116,115,0,129,0,14,
  19,7,3,1,8,107,109,47,104,0,
  129,0,78,19,7,3,1,8,107,109,
  47,104,0,129,0,15,50,7,3,1,
  8,107,109,47,104,0,129,0,78,50,
  7,3,1,8,107,109,47,104,0,67,
  5,41,28,20,5,1,8,16,11,129,
  0,43,24,17,3,1,8,76,101,110,
  107,119,105,110,107,101,108,0,67,5,
  41,44,20,5,1,8,16,11,129,0,
  45,40,12,3,1,8,71,105,101,114,
  114,97,116,101,0,129,0,43,50,15,
  3,1,8,194,176,47,83,101,107,117,
  110,100,101,0,129,0,48,34,7,3,
  1,8,71,114,97,100,0,67,5,41,
  13,20,5,1,8,16,11,129,0,35,
  9,31,3,1,8,70,97,104,114,103,
  101,115,99,104,119,105,110,100,105,103,
  107,101,105,116,0,129,0,48,19,7,
  3,1,8,107,109,47,104,0,131,0,
  26,2,21,5,2,2,31,68,105,97,
  103,114,97,109,109,0,68,52,2,9,
  96,52,2,8,36,133,94,178,118,111,
  114,110,47,108,105,110,107,115,0,118,
  111,114,110,47,114,101,99,104,116,115,
  0,104,105,110,116,101,110,47,108,105,
  110,107,115,0,104,105,110,116,101,110,
  47,114,101,99,104,116,115,0,131,0,
  78,2,21,5,3,2,31,80,97,114,
  97,109,101,116,101,114,0,67,5,71,
  28,20,5,1,8,16,11,129,0,72,
  24,18,3,1,8,81,117,101,114,98,
  101,115,99,104,108,46,0,129,0,78,
  34,6,3,1,8,109,47,115,194,178,
  0,2,0,45,56,13,5,1,2,26,
  31,31,79,78,0,79,70,70,0,7,
  45,1,14,11,3,3,2,26,2,3,
  129,0,6,9,13,3,3,8,68,114,
  117,99,107,32,118,47,108,0,129,0,
  4,12,4,2,3,8,78,117,108,108,
  0,7,45,14,14,11,3,3,2,26,
  2,2,129,0,16,12,7,2,3,8,
  98,97,114,47,86,111,108,116,0,7,
  45,1,23,11,3,3,2,26,2,3,
  129,0,6,18,13,3,3,8,68,114,
  117,99,107,32,118,47,114,0,129,0,
  4,21,4,2,3,8,78,117,108,108,
  0,7,45,14,23,11,3,3,2,26,
  2,2,129,0,16,21,7,2,3,8,
  98,97,114,47,86,111,108,116,0,7,
  45,1,33,11,3,3,2,26,2,3,
  129,0,6,28,13,3,3,8,68,114,
  117,99,107,32,104,47,108,0,129,0,
  4,31,4,2,3,8,78,117,108,108,
  0,7,45,14,33,11,3,3,2,26,
  2,2,129,0,16,31,7,2,3,8,
  98,97,114,47,86,111,108,116,0,7,
  45,1,43,11,3,3,2,26,2,3,
  129,0,6,38,14,3,3,8,68,114,
  117,99,107,32,104,47,114,0,129,0,
  4,41,4,2,3,8,78,117,108,108,
  0,7,45,14,43,11,3,3,2,26,
  2,2,129,0,16,41,7,2,3,8,
  98,97,114,47,86,111,108,116,0,7,
  45,1,53,11,3,3,2,26,2,3,
  129,0,5,48,17,3,3,8,76,101,
  110,107,119,105,110,107,101,108,0,129,
  0,4,51,4,2,3,8,78,117,108,
  108,0,7,45,14,53,11,3,3,2,
  26,2,2,129,0,16,51,5,2,3,
  8,194,176,47,86,111,108,116,0,129,
  0,32,9,17,3,3,8,83,101,110,
  115,111,114,114,97,100,0,7,53,34,
  14,11,3,3,2,26,2,129,0,35,
  12,9,2,3,8,90,195,164,104,110,
  101,122,97,104,108,0,7,45,28,23,
  11,3,3,2,26,2,3,129,0,33,
  18,12,3,3,8,71,105,101,114,114,
  97,116,101,0,129,0,31,21,4,2,
  3,8,78,117,108,108,0,7,45,41,
  23,11,3,3,2,26,2,4,129,0,
  43,21,5,2,3,8,86,111,108,116,
  47,194,176,47,115,0,7,45,28,33,
  11,3,3,2,26,2,3,129,0,31,
  28,17,3,3,8,81,117,101,114,98,
  101,115,99,104,108,46,0,129,0,31,
  31,4,2,3,8,78,117,108,108,0,
  7,45,41,33,11,3,3,2,26,2,
  3,129,0,42,31,8,2,3,8,86,
  111,108,116,47,109,47,115,194,178,0,
  1,1,36,43,10,5,3,2,31,78,
  117,108,108,0,129,0,33,40,15,2,
  3,8,83,105,103,110,97,108,45,78,
  117,108,108,112,117,110,107,116,0,129,
  0,34,49,14,2,3,8,68,114,117,
  99,107,115,101,110,115,111,114,101,110,
  0,129,0,34,51,14,2,3,8,76,
  101,110,107,119,105,110,107,101,108,112,
  111,116,105,0,1,1,41,57,20,5,
  3,2,31,83,112,101,105,99,104,101,
  114,110,0,66,1,2,13,4,9,1,
  1,26,66,1,93,13,4,9,1,1,
  26,131,0,52,2,21,5,4,2,31,
  65,66,83,32,86,47,76,0,68,51,
  2,9,96,52,4,8,36,135,94,82,
  97,100,32,107,109,47,104,0,66,114,
  101,109,115,101,32,98,97,114,0,65,
  117,116,111,32,107,109,47,104,0,67,
  5,0,22,8,3,1,242,13,11,67,
  5,91,22,8,3,1,242,13,11,7,
  45,8,59,11,3,3,2,26,2,4,
  129,0,9,57,9,2,3,8,105,32,
  71,101,116,114,105,101,98,101,0,66,
  1,2,44,4,9,1,1,26,67,5,
  0,53,8,3,1,242,13,11,66,1,
  93,44,4,9,1,1,26,67,5,91,
  53,8,3,1,242,13,11,129,0,59,
  9,15,3,3,8,65,117,116,111,32,
  107,109,47,104,0,7,53,61,14,11,
  3,3,2,26,2,129,0,60,12,12,
  2,3,8,86,109,97,120,45,83,105,
  103,110,97,108,0,129,0,59,18,17,
  3,3,8,83,116,195,182,114,103,114,
  195,182,195,159,101,110,0,7,45,55,
  25,11,3,3,2,26,2,2,129,0,
  58,23,4,2,3,8,107,108,101,105,
  110,0,7,45,68,25,11,3,3,2,
  26,2,2,129,0,70,23,4,2,3,
  8,103,114,111,195,159,0,7,45,55,
  33,11,3,3,2,26,2,2,129,0,
  58,31,4,2,3,8,107,108,101,105,
  110,0,7,45,68,33,11,3,3,2,
  26,2,2,129,0,70,31,4,2,3,
  8,103,114,111,195,159,0,129,0,58,
  21,18,2,3,8,195,156,98,101,114,
  45,47,85,110,116,101,114,115,116,101,
  117,101,114,110,0,129,0,56,29,19,
  2,3,8,81,117,101,114,98,101,115,
  99,104,108,101,117,110,105,103,117,110,
  103,0,129,0,54,38,26,3,3,8,
  66,114,101,109,115,101,110,107,101,110,
  110,122,97,104,108,0,7,45,61,43,
  11,3,3,2,26,2,2,129,0,63,
  41,6,2,3,8,70,97,107,116,111,
  114,0,129,0,55,48,26,3,3,8,
  70,97,104,114,122,101,117,103,109,97,
  115,115,101,0,7,53,61,53,11,3,
  3,2,26,2,129,0,65,51,2,2,
  3,8,107,103,0,69,1,27,53,10,
  10,3,129,0,83,9,11,3,3,8,
  83,99,104,108,117,112,102,0,129,0,
  84,12,10,2,3,8,65,110,116,114,
  105,101,98,32,86,76,0,7,45,83,
  14,11,3,3,2,26,2,2,7,45,
  83,20,11,3,0,2,26,2,2 };
 
// this structure defines all the variables and events of your control interface
struct {

    // input variables
  uint8_t switch_1; // =1 if switch ON and =0 if OFF
  float edit_1;
  float edit_2;
  float edit_3;
  float edit_4;
  float edit_5;
  float edit_6;
  float edit_7;
  float edit_8;
  float edit_9;
  float edit_10;
  int16_t edit_11;  // 32767.. +32767
  float edit_12;
  float edit_13;
  float edit_14;
  float edit_15;
  uint8_t button_1; // =1 if button pressed, else =0
  uint8_t button_2; // =1 if button pressed, else =0
  float edit_16;
  int16_t edit_17;  // 32767.. +32767
  float edit_18;
  float edit_19;
  float edit_20;
  float edit_21;
  float edit_22;
  int16_t edit_23;  // 32767.. +32767
  float edit_24;

  float edit_25; // <****************** additional edit field which prevents the program from starting *********************
                       // the program code is not adapted to the new edit field. Only the edit field has been added to the user interface. Nevertheless, the program no longer works.
                       // If the edit field is removed again, will it work again ?????

    // output variables
  char text_1[11];  // string UTF8 end zero
  char text_3[11];  // string UTF8 end zero
  char text_6[11];  // string UTF8 end zero
  char text_8[11];  // string UTF8 end zero
  char text_4[11];  // string UTF8 end zero
  char text_7[11];  // string UTF8 end zero
  char text_2[11];  // string UTF8 end zero
  float onlineGraph_1_var1;
  float onlineGraph_1_var2;
  float onlineGraph_1_var3;
  float onlineGraph_1_var4;
  char text_5[11];  // string UTF8 end zero
  int8_t level_1; // =0..100 level position
  int8_t level_2; // =0..100 level position
  float onlineGraph_2_var1;
  float onlineGraph_2_var2;
  float onlineGraph_2_var3;
  char text_9[11];  // string UTF8 end zero
  char text_10[11];  // string UTF8 end zero
  int8_t level_3; // =0..100 level position
  char text_11[11];  // string UTF8 end zero
  int8_t level_4; // =0..100 level position
  char text_12[11];  // string UTF8 end zero
  int16_t sound_1; // =0 no sound, else ID of sound, =1001 for example, look sound list in app

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)

SoftwareSerial mySerial(2, 3); // RX, TX
SoftwareSerial dySerial(4, 5); // RX, TX
SoftwareSerial wySerial(6, 7); // RX, TX

void rein()  //*************************************  loading the setting values
{
hwb = EEPROM.read(120);     
nwb = EEPROM.read(121); 
bytedezi();
RemoteXY.edit_1 = dez/100.0;  // Nullpunkt Drucksensor V/L
   
hwb = EEPROM.read(122);     
nwb = EEPROM.read(123);
bytedezi();
RemoteXY.edit_2 = dez/10.0; // Propfaktor Drucksensor V/L

hwb = EEPROM.read(124);     
nwb = EEPROM.read(125);
bytedezi();
RemoteXY.edit_3 = dez/100.0; // Propfaktor Drucksensor V/R

hwb = EEPROM.read(126);     
nwb = EEPROM.read(127);   
bytedezi();
RemoteXY.edit_4 = dez/10.0;// Propfaktor Drucksensor V/R

hwb = EEPROM.read(128);     
nwb = EEPROM.read(129);
bytedezi();
RemoteXY.edit_5 = dez/100.0; // Nullpunkt Drucksensor H/L

hwb = EEPROM.read(130);     
nwb = EEPROM.read(131);
bytedezi();
RemoteXY.edit_6 = dez/10.0; // Propfaktor Drucksensor H/L

hwb = EEPROM.read(132);     
nwb = EEPROM.read(133);
bytedezi();
RemoteXY.edit_7 = dez/100.0;// Nullpunkt Drucksensor H/R

hwb = EEPROM.read(134);     
nwb = EEPROM.read(135);
bytedezi();
RemoteXY.edit_8 = dez/10.0; // Propfaktor Drucksensor H/R

hwb = EEPROM.read(136);     
nwb = EEPROM.read(137);
bytedezi();
RemoteXY.edit_9 = dez/100.0; // Nullpunkt Lenkwinkelsensor

hwb = EEPROM.read(138);     
nwb = EEPROM.read(139);
bytedezi();
RemoteXY.edit_10 = dez/10.0;// Propfaktor Lenkwinkelsensor

hwb = EEPROM.read(140);     
nwb = EEPROM.read(141);
bytedezi();
RemoteXY.edit_16 = dez/1000.0; // Propfaktor Lenkgetriebe-Übersetzung

hwb = EEPROM.read(142);     
nwb = EEPROM.read(143);
bytedezi();
RemoteXY.edit_11 = dez;     // Zähnezahl Sensorrad

hwb = EEPROM.read(144);     
nwb = EEPROM.read(145);
bytedezi();
RemoteXY.edit_12 = dez/100.0; // Nullpunkt Gierratensignal

hwb = EEPROM.read(146);     
nwb = EEPROM.read(147);
bytedezi();
RemoteXY.edit_13 = dez/1000.0; // Propfaktor Gierratensignal

hwb = EEPROM.read(148);     
nwb = EEPROM.read(149);
bytedezi();
RemoteXY.edit_14 = dez/100.0; // Nullpunkt Querbeschlunigungssignal

hwb = EEPROM.read(150);     
nwb = EEPROM.read(151);
bytedezi();
RemoteXY.edit_15 = dez/100.0; // Propfaktor Querbeschlunigungssignal

hwb = EEPROM.read(152);     
nwb = EEPROM.read(153);
bytedezi();
RemoteXY.edit_17 = dez;       // Max-Geschwindigkeit die über PWM 0-255 ausgegeben werden kann

hwb = EEPROM.read(154);     
nwb = EEPROM.read(155);
bytedezi();
RemoteXY.edit_18 = dez/10;       // Über-/Untersteuern klein

hwb = EEPROM.read(156);     
nwb = EEPROM.read(157);
bytedezi();
RemoteXY.edit_19 = dez/10;       // Über-/Untersteuern groß

hwb = EEPROM.read(158);     
nwb = EEPROM.read(159);
bytedezi();
RemoteXY.edit_20 = dez/10;       // Querbeschleunigung klein

hwb = EEPROM.read(160);     
nwb = EEPROM.read(161);
bytedezi();
RemoteXY.edit_21 = dez/10;       // Querbeschleunigung groß

hwb = EEPROM.read(162);     
nwb = EEPROM.read(163);
bytedezi();
RemoteXY.edit_22 = dez/10;       // Bremsenkennzahl

hwb = EEPROM.read(164);     
nwb = EEPROM.read(165);
bytedezi();
RemoteXY.edit_23 = dez;       // Fahrzeugmasse

hwb = EEPROM.read(166);     
nwb = EEPROM.read(167);
bytedezi();
RemoteXY.edit_24 = dez/10;   // Antriebsschlupf VL

4 (edited by Guillaume 2020-06-07 19:48:15)

Re: 1 edit field decides whether it works?

I don't know. I have tried only your remotexy interface and it works for me on esp8266 (standalone, not using Serial)

Try increase serial speed to 115200 or even 921600 (no idea why you are all using 9600, it's very slow...). And if it still doesn't work, try disable parts of your code, until it works, then you may find or at least isolate your problem.

5 (edited by pascalou31 2020-06-08 00:43:52)

Re: 1 edit field decides whether it works?

j avais aussi cette erreur . si tu additionnes le nombre de caractères utilisés pour chaque champs tu dois arriver pas loin à 100 ?non?
du coup tu peux tout supprimer et en placer un à 90 et un autre avec 20 et cela fonctionnera pas (dans la version d'avril..!)

mais ça te résout pas ton problème à part diminuer la taille d'autres champs...