Value in Nextion Disyplay disappears

Hey friends.

i am stucking at a problem again. I am using a ESp32 and a Nextion display.

I try to display the value of a poti (and calculated values of it) on my Nextion display.

When i push a button, i want to save the current value of the poti into a membervariable). Everything works good, but when i enter a value into via numpad, the value of the poti disappears on my display.

Hard to decribe. Better look at the code, i commented it to understand it

#include <Arduino.h>
#include <Messumformer.h>
#include <Nextion.h>
#include <Globals.h>
#include <Messumformer.cpp>
#include <Globals.cpp>
#include <string>
using namespace std;
#include <iostream>     
#include <sstream>

#include <Wire.h>
#include "RTClib.h"
//#include <iostream>


int Messung_Poti = 32;
#define GREENLED 27

char buffer[25] = {0};

MessSonde SondePh(0,1200,0,8000);
Calibration CalSonde;

*******/
bool IsCal1Pushed = false;


/*******************************************************************
 ******************************Button Callbacks*********************
 *******************************************************************/

void kaliPopCallback(void *ptr)          
{
  IsCal1Pushed = false;
  IsCal2Pushed = false;
}

void kali_backPopCallback(void *ptr)    
{
  IsCal1Pushed = false;
  IsCal2Pushed = false;
}

void homeCalPopCallback(void *ptr)      
{
  IsCal1Pushed = false;
  IsCal2Pushed = false;
}

void cal_1PopCallback(void *ptr)        
{
  IsCal1Pushed = true;                                        // This function reads the values defpt2_min(from a textfield, where i can enter values) and the current value of the poti
  double defpt2_min;                                          // and stores them into membervariable of other class
  t1.getText(buffer, sizeof(buffer));
  defpt2_min = atof(buffer);
  CalSonde.set_defpoint2_min(defpt2_min);
  CalSonde.set_defpoint1_min(SondePh.get_m_raw());

}


void resetCalPopCallback(void *ptr)    // Reset-button im Manüpunkt "Kalibrieren"
{
  IsCal1Pushed = false;
}



/*******************************************************************
 ******************************Setup********************************
 *******************************************************************/

void setup(void)
{
  //Serial COM
  Serial.begin(9600);
  MySerial2.begin(9600);
  startChrono = millis();
  //Callbacks
  kali.attachPop(kaliPopCallback);
  kali_back.attachPop(kali_backPopCallback);
  cal_1.attachPop(cal_1PopCallback);
  cal_2.attachPop(cal_2PopCallback);
  speichern.attachPop(speichernPopCallback);
  homeCal.attachPop(homeCalPopCallback);
  resetCal.attachPop(resetCalPopCallback);
  speichernMI.attachPop(speichernMIPopCallback);


  nexInit();
}

/*******************************************************************
 ******************************loop********************************
 *******************************************************************/

void loop(void)
{

  nexLoop(nex_listen_list);
  if (millis() - startChrono >= 1000){
    SondePh.set_m_raw(analogRead(Messung_Poti));                             //Stores the measured value into a membervariable
    SondePh.set_m_maped(SondePh.mapTheRawInput(analogRead(Messung_Poti)));

    writedoubleToDisplay(mw_raw_main,SondePh.get_m_raw());                    //writes into Main page into texfield: mw_raw_main, mw_maped_main
    writedoubleToDisplay(mw_maped_main,SondePh.get_m_maped());
    
    if(!IsCal1Pushed)                                                          //  As long as IsCal1Pushed is false, write into my other page into textfield: mw_raw_cal_oben.mw_maped_cal_oben
    {
      writedoubleToDisplay(mw_raw_cal_oben,SondePh.get_m_raw());               //As soon the button (callback) cal_1PopCallback is pushed, stop writing
      writedoubleToDisplay(mw_maped_cal_oben,SondePh.get_m_maped());
    }
    
    if (IsCal1Pushed)                                                          // Button was pushed, so just write the latest measured value into the field mw_raw_cal_oben
    {  
      writedoubleToDisplay(mw_raw_cal_oben,CalSonde.get_defpoint1_max());
      
    }
    startChrono = millis(); 
  }
    
}

So the problem that i have now. When i push the cal_1PopCallback-button. Then the displaying of the values stops (thats what i want) and the Stored/saved value of the poti is displayed. So far so good. But when i then enter a value into t1-textfield via numpad an press ok, the textfield of the stored values shows zero.

i hope its a bit clear what my problem is.

As always, thank you for the support

PS: i reduced the code to make it more readable, so it wont compile

PS: i reduced the code to make it more readable, so it wont compile

Post code that WILL compile, if you want help.

Why do you have three functions that do exactly the same thing?

    if(!IsCal1Pushed)                                                          //  As long as IsCal1Pushed is false, write into my other page into textfield: mw_raw_cal_oben.mw_maped_cal_oben
    {
      writedoubleToDisplay(mw_raw_cal_oben,SondePh.get_m_raw());               //As soon the button (callback) cal_1PopCallback is pushed, stop writing
      writedoubleToDisplay(mw_maped_cal_oben,SondePh.get_m_maped());
    }
   
    if (IsCal1Pushed)

If it is not false, it must be true. There is no need to check again.

When the code is running, you do something that we can't see. The code does something, as a result, that we can not see.

As you are the only one that can see what happens, and you refuse to share that info, DO NOT START ANOTHER THREAD.

PaulS:
When the code is running, you do something that we can't see. The code does something, as a result, that we can not see.

As you are the only one that can see what happens, and you refuse to share that info, DO NOT START ANOTHER THREAD.

Like i menationed above. It reduced my code on purpose to make it more radable. It isnt that i "refused" to show it. what the hell?!. All my threads always included different problems (at a different progressstage) with my code and i always posted the solution ( you can track it) (if i found any). If it is realy more helpful to show the whole code, i will do so in the future

So i would appreciate if you would give me tips (yes i read the article "read this before posting") how to ask the forum for help with completly different problems at completly different progress-stages, instead say "dont post".

Manuel_o:
If it is realy more helpful to show the whole code, i will do so in the future

What would really be helpful is an MCVE.. This is a minimal (but COMPLETE) code the demonstrates the problem at hand. Only enough code to do that. No extra crap. Nothing unrelated.