Moze ktos mi z tym pomoże dodalem style 4 ale mi sie rozjechały okienka
void Mainframe::SetupStatusPanel(int control)
{//=========================================
// control bit 0: inverter addresses may have changed
// style 0: show all
// 1: show some
// 2: show all inverter 0
// 3: show all inverter 1
int ix;
int style;
if(control & 1)
{
for(ix=0; ix<N_INV; ix++)
{
if(inverter_address[ix] == 0)
{
power_total[ix] = 0;
inverters[ix].alive = 0;
}
else
{
txt_static[ix][0]->SetLabel(wxString::Format(_T("Falownik #%d"), inverter_address[ix]));
}
}
}
if(control & 2)
{
for(ix=0; ix < N_EXTRA_READINGS; ix++)
{
txt_dsp_param[0][ix]->Clear();
txt_dsp_param[1][ix]->Clear();
txt_dsp_param[2][ix]->Clear();
}
}
style = chart_pages[graph_panel->page].status_type;
if(inverter_address[1] == 0)
{
// only one inverter;
PlaceReadings(1, 0, 0, false);
PlaceReadings(1, 1, 0, false);
PlaceReadings(2, 0, 149, true);
PlaceReadings(2, 1, 0, false);
PlaceReadings(3, 0, 423, true);
PlaceReadings(3, 1, 0, false);
PlaceReadings(4, 0, 749, true);
PlaceReadings(4, 1, 0, false);
}
else
{
PlaceReadings(1, 0, 149, true);
if(style == 0)
{
// all
PlaceReadings(2, 0, 239, true);
PlaceReadings(1, 1, 518, true);
PlaceReadings(2, 1, 608, true);
PlaceReadings(3, 0, 887, true);
PlaceReadings(3, 1, 1207, true);
PlaceReadings(4, 0, 1527, true);
PlaceReadings(4, 1, 0, false);
}
if(style == 1)
{
// some
PlaceReadings(2, 0, 239, true);
PlaceReadings(1, 1, 509, true);
PlaceReadings(2, 1, 599, true);
PlaceReadings(3, 0, 0, false);
PlaceReadings(3, 1, 0, false);
PlaceReadings(4, 0, 931, true);
PlaceReadings(4, 1, 0, false);
PlaceReadings(5, 0, 861, true);
}
if(style == 2)
{
// inverter A
PlaceReadings(2, 0, 239, true);
PlaceReadings(1, 1, 831, true);
PlaceReadings(2, 1, 0, false);
PlaceReadings(3, 0, 511, true);
PlaceReadings(3, 1, 0, false);
PlaceReadings(4, 0, 931, true);
PlaceReadings(4, 1, 0, false);
}
if(style == 3)
{
// inverter B
PlaceReadings(2, 0, 0, false);
PlaceReadings(1, 1, 259, true);
PlaceReadings(2, 1, 349, true);
PlaceReadings(3, 0, 0, false);
PlaceReadings(3, 1, 611, true);
PlaceReadings(4, 0, 0, false);
PlaceReadings(4, 1, 931, true);
}
if(style == 4)
{
// inverter C
PlaceReadings(2, 0, 0, false);
PlaceReadings(1, 1, 259, true);
PlaceReadings(2, 1, 349, true);
PlaceReadings(3, 0, 0, false);
PlaceReadings(3, 1, 611, true);
PlaceReadings(4, 0, 0, false);
PlaceReadings(4, 1, 931, true);
}
}
for(ix=0; ix<N_INV; ix++)
{
ShowEnergy(ix);
txt_energy[ix][1]->ChangeValue(wxString::Format(_T("%d"), inverters[ix].peak));
}
}