internal void processToScreen() { set_widget_lang(); Params.Items.Clear(); Params.Objects.ForEach(x => { Params.RemoveObject(x); }); Params.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.SingleClick; Params.CanExpandGetter = delegate(object x) { data y = (data)x; if (y.children != null && y.children.Count > 0) return true; return false; }; this.cbx_fc.SelectedIndex = getU16Param(eeprom, (int)_paramsAddr["FC_Type"]); Params.ChildrenGetter = delegate(object x) { data y = (data)x; return new ArrayList(y.children); }; List<data> roots = new List<data>(); data dataAtti = new PlayuavOSD.data(); dataAtti.paramname = "Attitude"; dataAtti.desc = lang.getLangStr("Attitude"); dataAtti.children.Add(genChildData(dataAtti.paramname, "MP_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_MP_Enable"]), "", "0, 1", lang.getLangStr("Attitude_MP_Enable"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "MP_Panel", getU16PanelString(eeprom, (int)_paramsAddr["Attitude_MP_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); //dataAtti.children.Add(genChildData(dataAtti.paramname, "MP_Mode", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_MP_Mode"]), "", "0, 1", lang.getLangStr("Attitude_MP_Mode"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "MP_H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_MP_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "MP_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_MP_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "MP_Scale", getScaleParamString(eeprom, (int)_paramsAddr["Attitude_MP_Scale_Real"]), "", "", lang.getLangStr("Attitude_Scale"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "3D_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_3D_Enable"]), "", "0, 1", lang.getLangStr("Attitude_3D_Enable"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "3D_Panel", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_3D_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "3D_H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_3D_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "3D_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_3D_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "3D_Scale", getScaleParamString(eeprom, (int)_paramsAddr["Attitude_3D_Scale_Real"]), "", "", lang.getLangStr("Attitude_Scale"))); dataAtti.children.Add(genChildData(dataAtti.paramname, "3D_Map_radius", getU16ParamString(eeprom, (int)_paramsAddr["Attitude_3D_Map_radius"]), "", "", lang.getLangStr("Attitude_3D_Map_radius"))); roots.Add(dataAtti); data dataMisc = new PlayuavOSD.data(); dataMisc.paramname = "Misc"; dataMisc.desc = lang.getLangStr("Misc"); dataMisc.children.Add(genChildData(dataMisc.paramname, "Units_Mode", getU16ParamString(eeprom, (int)_paramsAddr["Misc_Units_Mode"]), "", "0, 1", lang.getLangStr("Misc_Units_Mode"))); dataMisc.children.Add(genChildData(dataMisc.paramname, "Max_Panels", getU16ParamString(eeprom, (int)_paramsAddr["Misc_Max_Panels"]), "", ">=1", lang.getLangStr("Misc_Max_Panels"))); dataMisc.children.Add(genChildData(dataMisc.paramname, "Start_Row", getU16ParamString(eeprom, (int)_paramsAddr["Misc_Start_Row"]), "", "-20 - +20", lang.getLangStr("Misc_Start_Row"))); dataMisc.children.Add(genChildData(dataMisc.paramname, "Start_Col", getU16ParamString(eeprom, (int)_paramsAddr["Misc_Start_Col"]), "", "-20 - +20", lang.getLangStr("Misc_Start_Col"))); dataMisc.children.Add(genChildData(dataMisc.paramname, "Video_Mode", getU16ParamString(eeprom, (int)_paramsAddr["Misc_Video_Mode"]), "", "0, 1", lang.getLangStr("Misc_Video_Mode"))); roots.Add(dataMisc); data dataPWM = new PlayuavOSD.data(); dataPWM.paramname = "PWM"; dataPWM.desc = lang.getLangStr("PWM"); dataPWM.children.Add(genChildData(dataPWM.paramname, "Video_Enable", getU16ParamString(eeprom, (int)_paramsAddr["PWM_Video_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataPWM.children.Add(genChildData(dataPWM.paramname, "Video_Chanel", getU16ParamString(eeprom, (int)_paramsAddr["PWM_Video_Chanel"]), "", "5-16", lang.getLangStr("PWM_Video_Chanel"))); dataPWM.children.Add(genChildData(dataPWM.paramname, "Video_Value", getU16ParamString(eeprom, (int)_paramsAddr["PWM_Video_Value"]), "", "", lang.getLangStr("PWM_Video_Value"))); dataPWM.children.Add(genChildData(dataPWM.paramname, "Panel_Enable", getU16ParamString(eeprom, (int)_paramsAddr["PWM_Panel_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataPWM.children.Add(genChildData(dataPWM.paramname, "Panel_Chanel", getU16ParamString(eeprom, (int)_paramsAddr["PWM_Panel_Chanel"]), "", "5-16", lang.getLangStr("PWM_Panel_Chanel"))); dataPWM.children.Add(genChildData(dataPWM.paramname, "Panel_Value", getU16ParamString(eeprom, (int)_paramsAddr["PWM_Panel_Value"]), "", "", lang.getLangStr("PWM_Panel_Value"))); roots.Add(dataPWM); data dataArm = new PlayuavOSD.data(); dataArm.paramname = "ArmState"; dataArm.desc = lang.getLangStr("ArmState"); dataArm.children.Add(genChildData(dataArm.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["ArmState_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataArm.children.Add(genChildData(dataArm.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["ArmState_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataArm.children.Add(genChildData(dataArm.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["ArmState_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataArm.children.Add(genChildData(dataArm.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["ArmState_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataArm.children.Add(genChildData(dataArm.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["ArmState_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataArm.children.Add(genChildData(dataArm.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["ArmState_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataArm); data dataBattVolt = new PlayuavOSD.data(); dataBattVolt.paramname = "BatteryVoltage"; dataBattVolt.desc = lang.getLangStr("BatteryVoltage"); dataBattVolt.children.Add(genChildData(dataBattVolt.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["BatteryVoltage_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataBattVolt.children.Add(genChildData(dataBattVolt.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["BatteryVoltage_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataBattVolt.children.Add(genChildData(dataBattVolt.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryVoltage_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataBattVolt.children.Add(genChildData(dataBattVolt.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryVoltage_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataBattVolt.children.Add(genChildData(dataBattVolt.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["BatteryVoltage_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataBattVolt.children.Add(genChildData(dataBattVolt.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["BatteryVoltage_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataBattVolt); data dataBattCurrent = new PlayuavOSD.data(); dataBattCurrent.paramname = "BatteryCurrent"; dataBattCurrent.desc = lang.getLangStr("BatteryCurrent"); dataBattCurrent.children.Add(genChildData(dataBattCurrent.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["BatteryCurrent_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataBattCurrent.children.Add(genChildData(dataBattCurrent.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["BatteryCurrent_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataBattCurrent.children.Add(genChildData(dataBattCurrent.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryCurrent_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataBattCurrent.children.Add(genChildData(dataBattCurrent.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryCurrent_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataBattCurrent.children.Add(genChildData(dataBattCurrent.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["BatteryCurrent_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataBattCurrent.children.Add(genChildData(dataBattCurrent.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["BatteryCurrent_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataBattCurrent); data dataBattRemaining = new PlayuavOSD.data(); dataBattRemaining.paramname = "BatteryRemaining"; dataBattRemaining.desc = lang.getLangStr("BatteryRemaining"); dataBattRemaining.children.Add(genChildData(dataBattRemaining.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["BatteryRemaining_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataBattRemaining.children.Add(genChildData(dataBattRemaining.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["BatteryRemaining_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataBattRemaining.children.Add(genChildData(dataBattRemaining.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryRemaining_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataBattRemaining.children.Add(genChildData(dataBattRemaining.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryRemaining_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataBattRemaining.children.Add(genChildData(dataBattRemaining.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["BatteryRemaining_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataBattRemaining.children.Add(genChildData(dataBattRemaining.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["BatteryRemaining_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataBattRemaining); data dataBattConsumed = new PlayuavOSD.data(); dataBattConsumed.paramname = "BatteryConsumed"; dataBattConsumed.desc = lang.getLangStr("BatteryConsumed"); dataBattConsumed.children.Add(genChildData(dataBattConsumed.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["BatteryConsumed_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataBattConsumed.children.Add(genChildData(dataBattConsumed.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["BatteryConsumed_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataBattConsumed.children.Add(genChildData(dataBattConsumed.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryConsumed_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataBattConsumed.children.Add(genChildData(dataBattConsumed.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["BatteryConsumed_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataBattConsumed.children.Add(genChildData(dataBattConsumed.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["BatteryConsumed_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataBattConsumed.children.Add(genChildData(dataBattConsumed.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["BatteryConsumed_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataBattConsumed); data dataFlightMode = new PlayuavOSD.data(); dataFlightMode.paramname = "FlightMode"; dataFlightMode.desc = lang.getLangStr("FlightMode"); dataFlightMode.children.Add(genChildData(dataFlightMode.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["FlightMode_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataFlightMode.children.Add(genChildData(dataFlightMode.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["FlightMode_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataFlightMode.children.Add(genChildData(dataFlightMode.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["FlightMode_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataFlightMode.children.Add(genChildData(dataFlightMode.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["FlightMode_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataFlightMode.children.Add(genChildData(dataFlightMode.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["FlightMode_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataFlightMode.children.Add(genChildData(dataFlightMode.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["FlightMode_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataFlightMode); data dataGPSStatus = new PlayuavOSD.data(); dataGPSStatus.paramname = "GPSStatus"; dataGPSStatus.desc = lang.getLangStr("GPSStatus"); dataGPSStatus.children.Add(genChildData(dataGPSStatus.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPSStatus_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPSStatus.children.Add(genChildData(dataGPSStatus.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPSStatus_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPSStatus.children.Add(genChildData(dataGPSStatus.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSStatus_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPSStatus.children.Add(genChildData(dataGPSStatus.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSStatus_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPSStatus.children.Add(genChildData(dataGPSStatus.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPSStatus_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPSStatus.children.Add(genChildData(dataGPSStatus.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPSStatus_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPSStatus); data dataGPSHDOP = new PlayuavOSD.data(); dataGPSHDOP.paramname = "GPSHDOP"; dataGPSHDOP.desc = lang.getLangStr("GPSHDOP"); dataGPSHDOP.children.Add(genChildData(dataGPSHDOP.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPSHDOP_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPSHDOP.children.Add(genChildData(dataGPSHDOP.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPSHDOP_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPSHDOP.children.Add(genChildData(dataGPSHDOP.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSHDOP_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPSHDOP.children.Add(genChildData(dataGPSHDOP.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSHDOP_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPSHDOP.children.Add(genChildData(dataGPSHDOP.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPSHDOP_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPSHDOP.children.Add(genChildData(dataGPSHDOP.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPSHDOP_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPSHDOP); data dataGPSLat = new PlayuavOSD.data(); dataGPSLat.paramname = "GPSLatitude"; dataGPSLat.desc = lang.getLangStr("GPSLatitude"); dataGPSLat.children.Add(genChildData(dataGPSLat.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPSLatitude_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPSLat.children.Add(genChildData(dataGPSLat.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPSLatitude_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPSLat.children.Add(genChildData(dataGPSLat.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSLatitude_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPSLat.children.Add(genChildData(dataGPSLat.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSLatitude_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPSLat.children.Add(genChildData(dataGPSLat.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPSLatitude_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPSLat.children.Add(genChildData(dataGPSLat.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPSLatitude_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPSLat); data dataGPSLon = new PlayuavOSD.data(); dataGPSLon.paramname = "GPSLongitude"; dataGPSLon.desc = lang.getLangStr("GPSLongitude"); dataGPSLon.children.Add(genChildData(dataGPSLon.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPSLongitude_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPSLon.children.Add(genChildData(dataGPSLon.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPSLongitude_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPSLon.children.Add(genChildData(dataGPSLon.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSLongitude_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPSLon.children.Add(genChildData(dataGPSLon.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPSLongitude_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPSLon.children.Add(genChildData(dataGPSLon.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPSLongitude_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPSLon.children.Add(genChildData(dataGPSLon.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPSLongitude_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPSLon); data dataGPS2Status = new PlayuavOSD.data(); dataGPS2Status.paramname = "GPS2Status"; dataGPS2Status.desc = lang.getLangStr("GPS2Status"); dataGPS2Status.children.Add(genChildData(dataGPS2Status.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Status_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPS2Status.children.Add(genChildData(dataGPS2Status.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPS2Status_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPS2Status.children.Add(genChildData(dataGPS2Status.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Status_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPS2Status.children.Add(genChildData(dataGPS2Status.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Status_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPS2Status.children.Add(genChildData(dataGPS2Status.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Status_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPS2Status.children.Add(genChildData(dataGPS2Status.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Status_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPS2Status); data dataGPS2HDOP = new PlayuavOSD.data(); dataGPS2HDOP.paramname = "GPS2HDOP"; dataGPS2HDOP.desc = lang.getLangStr("GPS2HDOP"); dataGPS2HDOP.children.Add(genChildData(dataGPS2HDOP.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPS2HDOP_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPS2HDOP.children.Add(genChildData(dataGPS2HDOP.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPS2HDOP_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPS2HDOP.children.Add(genChildData(dataGPS2HDOP.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2HDOP_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPS2HDOP.children.Add(genChildData(dataGPS2HDOP.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2HDOP_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPS2HDOP.children.Add(genChildData(dataGPS2HDOP.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPS2HDOP_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPS2HDOP.children.Add(genChildData(dataGPS2HDOP.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPS2HDOP_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPS2HDOP); data dataGPS2Lat = new PlayuavOSD.data(); dataGPS2Lat.paramname = "GPS2Latitude"; dataGPS2Lat.desc = lang.getLangStr("GPS2Latitude"); dataGPS2Lat.children.Add(genChildData(dataGPS2Lat.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Latitude_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPS2Lat.children.Add(genChildData(dataGPS2Lat.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPS2Latitude_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPS2Lat.children.Add(genChildData(dataGPS2Lat.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Latitude_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPS2Lat.children.Add(genChildData(dataGPS2Lat.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Latitude_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPS2Lat.children.Add(genChildData(dataGPS2Lat.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Latitude_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPS2Lat.children.Add(genChildData(dataGPS2Lat.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Latitude_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPS2Lat); data dataGPS2Lon = new PlayuavOSD.data(); dataGPS2Lon.paramname = "GPS2Longitude"; dataGPS2Lon.desc = lang.getLangStr("GPS2Longitude"); dataGPS2Lon.children.Add(genChildData(dataGPS2Lon.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Longitude_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataGPS2Lon.children.Add(genChildData(dataGPS2Lon.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["GPS2Longitude_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataGPS2Lon.children.Add(genChildData(dataGPS2Lon.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Longitude_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataGPS2Lon.children.Add(genChildData(dataGPS2Lon.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Longitude_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataGPS2Lon.children.Add(genChildData(dataGPS2Lon.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Longitude_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataGPS2Lon.children.Add(genChildData(dataGPS2Lon.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["GPS2Longitude_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataGPS2Lon); data dataTime = new PlayuavOSD.data(); dataTime.paramname = "Time"; dataTime.desc = lang.getLangStr("Time"); dataTime.children.Add(genChildData(dataTime.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["Time_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataTime.children.Add(genChildData(dataTime.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["Time_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataTime.children.Add(genChildData(dataTime.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Time_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataTime.children.Add(genChildData(dataTime.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Time_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataTime.children.Add(genChildData(dataTime.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["Time_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataTime.children.Add(genChildData(dataTime.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["Time_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); dataTime.children.Add(genChildData(dataTime.paramname, "Type", getU16PanelString(eeprom, (int)_paramsAddr["Time_Type"]), "", "0, 1, 2", lang.getLangStr("Time_Type"))); roots.Add(dataTime); data dataAlt = new PlayuavOSD.data(); dataAlt.paramname = "Altitude"; dataAlt.desc = lang.getLangStr("Altitude"); dataAlt.children.Add(genChildData(dataAlt.paramname, "TALT_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_TALT_Enable"]), "", "0, 1", lang.getLangStr("Altitude_TALT_Enable"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "TALT_Panel", getU16PanelString(eeprom, (int)_paramsAddr["Altitude_TALT_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "TALT_H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_TALT_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "TALT_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_TALT_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "TALT_Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_TALT_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "TALT_H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_TALT_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "Scale_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_Scale_Enable"]), "", "0, 1", lang.getLangStr("Altitude_Scale_Enable"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "Scale_Panel", getU16PanelString(eeprom, (int)_paramsAddr["Altitude_Scale_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "Scale_H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_Scale_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "Scale_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_Scale_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataAlt.children.Add(genChildData(dataAlt.paramname, "Scale_Align", getU16ParamString(eeprom, (int)_paramsAddr["Altitude_Scale_Align"]), "", "0, 1", lang.getLangStr("Scale_Align"))); roots.Add(dataAlt); data dataSpeed = new PlayuavOSD.data(); dataSpeed.paramname = "Speed"; dataSpeed.desc = lang.getLangStr("Speed"); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "TSPD_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Speed_TSPD_Enable"]), "", "0, 1", lang.getLangStr("Speed_TSPD_Enable"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "TSPD_Panel", getU16PanelString(eeprom, (int)_paramsAddr["Speed_TSPD_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "TSPD_H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Speed_TSPD_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "TSPD_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Speed_TSPD_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "TSPD_Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["Speed_TSPD_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "TSPD_H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["Speed_TSPD_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "Scale_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Speed_Scale_Enable"]), "", "0, 1", lang.getLangStr("Speed_Scale_Enable"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "Scale_Panel", getU16PanelString(eeprom, (int)_paramsAddr["Speed_Scale_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "Scale_H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Speed_Scale_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "Scale_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Speed_Scale_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataSpeed.children.Add(genChildData(dataSpeed.paramname, "Scale_Align", getU16ParamString(eeprom, (int)_paramsAddr["Speed_Scale_Align"]), "", "0, 1", lang.getLangStr("Scale_Align"))); roots.Add(dataSpeed); data dataThrottle = new PlayuavOSD.data(); dataThrottle.paramname = "Throttle"; dataThrottle.desc = lang.getLangStr("Throttle"); dataThrottle.children.Add(genChildData(dataThrottle.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["Throttle_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataThrottle.children.Add(genChildData(dataThrottle.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["Throttle_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataThrottle.children.Add(genChildData(dataThrottle.paramname, "Scale_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Throttle_Scale_Enable"]), "", "0, 1", lang.getLangStr("Throttle_Scale_Enable"))); dataThrottle.children.Add(genChildData(dataThrottle.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Throttle_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataThrottle.children.Add(genChildData(dataThrottle.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Throttle_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataThrottle.children.Add(genChildData(dataThrottle.paramname, "Scale_Type", getU16ParamString(eeprom, (int)_paramsAddr["Throttle_Scale_Type"]), "", "0, 1", lang.getLangStr("Throttle_Scale_Type"))); roots.Add(dataThrottle); data dataHomeDist = new PlayuavOSD.data(); dataHomeDist.paramname = "HomeDistance"; dataHomeDist.desc = lang.getLangStr("HomeDistance"); dataHomeDist.children.Add(genChildData(dataHomeDist.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["HomeDistance_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataHomeDist.children.Add(genChildData(dataHomeDist.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["HomeDistance_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataHomeDist.children.Add(genChildData(dataHomeDist.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["HomeDistance_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataHomeDist.children.Add(genChildData(dataHomeDist.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["HomeDistance_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataHomeDist.children.Add(genChildData(dataHomeDist.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["HomeDistance_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataHomeDist.children.Add(genChildData(dataHomeDist.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["HomeDistance_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataHomeDist); data dataWPDist = new PlayuavOSD.data(); dataWPDist.paramname = "WPDistance"; dataWPDist.desc = lang.getLangStr("WPDistance"); dataWPDist.children.Add(genChildData(dataWPDist.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["WPDistance_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataWPDist.children.Add(genChildData(dataWPDist.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["WPDistance_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataWPDist.children.Add(genChildData(dataWPDist.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["WPDistance_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataWPDist.children.Add(genChildData(dataWPDist.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["WPDistance_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataWPDist.children.Add(genChildData(dataWPDist.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["WPDistance_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataWPDist.children.Add(genChildData(dataWPDist.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["WPDistance_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataWPDist); data dataDir = new PlayuavOSD.data(); dataDir.paramname = "CHWDIR"; dataDir.desc = lang.getLangStr("CHWDIR"); dataDir.children.Add(genChildData(dataDir.paramname, "Tmode_Enable", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Tmode_Enable"]), "", "0, 1", lang.getLangStr("CHWDIR_Tmode_Enable"))); dataDir.children.Add(genChildData(dataDir.paramname, "Tmode_Panel", getU16PanelString(eeprom, (int)_paramsAddr["CHWDIR_Tmode_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataDir.children.Add(genChildData(dataDir.paramname, "Tmode_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Tmode_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataDir.children.Add(genChildData(dataDir.paramname, "Nmode_Enable", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Nmode_Enable"]), "", "0, 1", lang.getLangStr("CHWDIR_Nmode_Enable"))); dataDir.children.Add(genChildData(dataDir.paramname, "Nmode_Panel", getU16PanelString(eeprom, (int)_paramsAddr["CHWDIR_Nmode_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataDir.children.Add(genChildData(dataDir.paramname, "Nmode_H_Position", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Nmode_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataDir.children.Add(genChildData(dataDir.paramname, "Nmode_V_Position", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Nmode_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataDir.children.Add(genChildData(dataDir.paramname, "Nmode_Radius", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Nmode_Radius"]), "", "0 - 230", lang.getLangStr("CHWDIR_Nmode_Radius"))); dataDir.children.Add(genChildData(dataDir.paramname, "Nmode_Home_Radius", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Nmode_Home_Radius"]), "", "0 - 230", lang.getLangStr("CHWDIR_Nmode_Home_Radius"))); dataDir.children.Add(genChildData(dataDir.paramname, "Nmode_WP_Radius", getU16ParamString(eeprom, (int)_paramsAddr["CHWDIR_Nmode_WP_Radius"]), "", "0 - 230", lang.getLangStr("CHWDIR_Nmode_WP_Radius"))); roots.Add(dataDir); data dataAlarm = new PlayuavOSD.data(); dataAlarm.paramname = "Alarm"; dataAlarm.desc = lang.getLangStr("Alarm"); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "GPS_Status_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_GPS_Status_Enable"]), "", "0, 1", lang.getLangStr("Alarm_GPS_Status_Enable"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Low_Batt_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Low_Batt_Enable"]), "", "0, 1", lang.getLangStr("Alarm_Low_Batt_Enable"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Low_Batt", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Low_Batt"]), "", "0 - 99", lang.getLangStr("alarmval"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Under_Speed_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Under_Speed_Enable"]), "", "0, 1", lang.getLangStr("Alarm_Under_Speed_Enable"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Under_Speed", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Under_Speed"]), "", "", lang.getLangStr("alarmval"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Over_Speed_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Over_Speed_Enable"]), "", "0, 1", lang.getLangStr("Alarm_Over_Speed_Enable"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Over_Speed", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Over_Speed"]), "", "", lang.getLangStr("alarmval"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Under_Alt_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Under_Alt_Enable"]), "", "0, 1", lang.getLangStr("Alarm_Under_Alt_Enable"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Under_Alt", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Under_Alt"]), "", "", lang.getLangStr("alarmval"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Over_Alt_Enable", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Over_Alt_Enable"]), "", "0, 1", lang.getLangStr("Alarm_Over_Alt_Enable"))); dataAlarm.children.Add(genChildData(dataAlarm.paramname, "Over_Alt", getU16ParamString(eeprom, (int)_paramsAddr["Alarm_Over_Alt"]), "", "", lang.getLangStr("alarmval"))); roots.Add(dataAlarm); data dataClimb = new PlayuavOSD.data(); dataClimb.paramname = "ClimbRate"; dataClimb.desc = lang.getLangStr("ClimbRate"); dataClimb.children.Add(genChildData(dataClimb.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["ClimbRate_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataClimb.children.Add(genChildData(dataClimb.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["ClimbRate_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataClimb.children.Add(genChildData(dataClimb.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["ClimbRate_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataClimb.children.Add(genChildData(dataClimb.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["ClimbRate_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataClimb.children.Add(genChildData(dataClimb.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["ClimbRate_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); //dataClimb.children.Add(genChildData(dataClimb.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["ClimbRate_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataClimb); data dataRSSI = new PlayuavOSD.data(); dataRSSI.paramname = "RSSI"; dataRSSI.desc = lang.getLangStr("RSSI"); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["RSSI_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_V_Position"]), "", "0 - 230", lang.getLangStr("Misc"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "Min", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_Min"]), "", "0-255", lang.getLangStr("RSSI_Min"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "Max", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_Max"]), "", "RSSI_Min-255", lang.getLangStr("RSSI_Max"))); dataRSSI.children.Add(genChildData(dataRSSI.paramname, "Raw_Enable", getU16ParamString(eeprom, (int)_paramsAddr["RSSI_Raw_Enable"]), "", "0, 1", lang.getLangStr("RSSI_Raw_Enable"))); roots.Add(dataRSSI); data dataWind = new PlayuavOSD.data(); dataWind.paramname = "Wind"; dataWind.desc = lang.getLangStr("Wind_speed_dir"); dataWind.children.Add(genChildData(dataWind.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["Wind_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataWind.children.Add(genChildData(dataWind.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["Wind_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataWind.children.Add(genChildData(dataWind.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["Wind_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataWind.children.Add(genChildData(dataWind.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["Wind_V_Position"]), "", "0 - 230", lang.getLangStr("Misc"))); roots.Add(dataWind); data dataTotalTrip = new PlayuavOSD.data(); dataTotalTrip.paramname = "TotalTrip"; dataTotalTrip.desc = lang.getLangStr("TotalTrip"); dataTotalTrip.children.Add(genChildData(dataTotalTrip.paramname, "Enable", getU16ParamString(eeprom, (int)_paramsAddr["TotalTrip_Enable"]), "", "0, 1", lang.getLangStr("enable"))); dataTotalTrip.children.Add(genChildData(dataTotalTrip.paramname, "Panel", getU16PanelString(eeprom, (int)_paramsAddr["TotalTrip_Panel"]), "", "1 - Max_Panels", lang.getLangStr("panel"))); dataTotalTrip.children.Add(genChildData(dataTotalTrip.paramname, "H_Position", getU16ParamString(eeprom, (int)_paramsAddr["TotalTrip_H_Position"]), "", "0 - 350", lang.getLangStr("hpos"))); dataTotalTrip.children.Add(genChildData(dataTotalTrip.paramname, "V_Position", getU16ParamString(eeprom, (int)_paramsAddr["TotalTrip_V_Position"]), "", "0 - 230", lang.getLangStr("vpos"))); dataTotalTrip.children.Add(genChildData(dataTotalTrip.paramname, "Font_Size", getU16ParamString(eeprom, (int)_paramsAddr["TotalTrip_Font_Size"]), "", "0, 1, 2", lang.getLangStr("font"))); dataTotalTrip.children.Add(genChildData(dataTotalTrip.paramname, "H_Alignment", getU16ParamString(eeprom, (int)_paramsAddr["TotalTrip_H_Alignment"]), "", "0, 1, 2", lang.getLangStr("halign"))); roots.Add(dataTotalTrip); foreach (var item in roots) { // if the child has no children, we dont need the root. if (((List<data>)item.children).Count == 1) { Params.AddObject(((List<data>)item.children)[0]); continue; } else { } Params.AddObject(item); } }
internal PlayuavOSD.data genChildData(string root, string name, string value, string unit, string range, string desc) { data data = new PlayuavOSD.data(); data.root = root; data.paramname = name; data.Value = value; data.unit = unit; data.range = range; data.desc = desc; return data; }