Пример #1
0
from oxsConfig import ttk , W , E , fFrsky , frskyVfasVar , frskyFuelVar , frskyA3Var , frskyA4Var , \
  frskyAccxVar , frskyAccyVar , frskyAcczVar , frskyT1Var , frskyT2Var

#here start the definition of the FRSKY tab
ttk.Label(fFrsky, text="VFAS").grid(column=0,
                                    row=1,
                                    padx=(15, 5),
                                    pady=(25, 5),
                                    sticky=(E))
frskyVfasBox = ttk.Combobox(fFrsky,
                            textvariable=frskyVfasVar,
                            values=('Not sent', 'VOLT_1', 'VOLT_2', 'VOLT_3',
                                    'VOLT_4', 'VOLT_5', 'VOLT_6', 'ADS_VOLT_1',
                                    'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4'),
                            state="readonly")
frskyVfasBox.grid(column=1, row=1, pady=(25, 5), sticky=(W))
ttk.Label(fFrsky, text="Fuel").grid(column=0,
                                    row=2,
                                    padx=(15, 5),
                                    pady=5,
                                    sticky=(E))
frskyFuelBox = ttk.Combobox(fFrsky,
                            textvariable=frskyFuelVar,
                            values=('Not sent', 'VOLT_1', 'VOLT_2', 'VOLT_3',
                                    'VOLT_4', 'VOLT_5', 'VOLT_6', 'ADS_VOLT_1',
                                    'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4'),
                            state="readonly")
frskyFuelBox.grid(column=1, row=2, sticky=(W))
ttk.Label(fFrsky, text="A3").grid(column=0,
                                  row=3,
                                  padx=(15, 5),
Пример #2
0
from oxsConfig import ttk, W, E, Spinbox, fVario, varioTypeVar, secondBaroExist, varioSourceVar, varioHysteresisVar
from oxsConfig import analogVarioChanged, fAnalogVario, analogVarioExist, varioAnalogPinVar, varioAnalogMaxVar, varioAnalogMinVar

#here start the definition of the vario tab
ttk.Label(fVario, text="Type of sensor").grid(row=1, pady=(20, 2))
varioTypeBox = ttk.Combobox(fVario,
                            textvariable=varioTypeVar,
                            values=('MS5611', "GY86", "BMP085", "BMP180",
                                    "GY87", "BMP280"),
                            state="readonly")
#varioBox.bind('<<ComboboxSelected>>', varioChanged)
#protocolBox['state']='readonly'
varioTypeBox.grid(row=2, padx=10)
ttk.Checkbutton(fVario,
                text='a MS5611 is added as second sensor',
                variable=secondBaroExist,
                onvalue='On',
                offvalue='Off').grid(row=3,
                                     sticky=(W, E),
                                     padx=20,
                                     pady=(20, 2))

ttk.Label(fVario, text="Source of Vspeed field").grid(row=4, pady=(20, 2))
varioSourceBox = ttk.Combobox(fVario,
                              textvariable=varioSourceVar,
                              values=('FIRST_BARO', 'BARO_AND_IMU',
                                      'SECOND_BARO', 'AVERAGE_FIRST_SECOND',
                                      'AIRSPEED_COMPENSATED', 'PPM_SELECTION'),
                              state="readonly")
#varioBox.bind('<<ComboboxSelected>>', varioChanged)
#protocolBox['state']='readonly'
Пример #3
0
                                     sticky=('E'))
ttk.Label(fMultiplex, text="8").grid(column=0,
                                     row=9,
                                     padx=(15, 5),
                                     pady=(10, 5),
                                     sticky=('E'))
ttk.Label(fMultiplex, text="9").grid(column=0,
                                     row=10,
                                     padx=(15, 5),
                                     pady=(10, 5),
                                     sticky=('E'))

MultiplexLine1Box = ttk.Combobox(
    fMultiplex,
    textvariable=multiplexLine1Var,
    values=('Not sent', 'VOLT_1', 'VOLT_2', 'VOLT_3', 'VOLT_4', 'VOLT_5',
            'VOLT_6', 'REL_ALTIMETER', 'VERTICAL_SPEED', 'ALTIMETER_MAX',
            'CURRENTMA', 'MILLIAH', 'CELL_TOT'
            'PPM'),
    state="readonly")
MultiplexLine1Box.grid(column=1, row=2, pady=(10, 5), sticky=('W'))
MultiplexLine2Box = ttk.Combobox(
    fMultiplex,
    textvariable=multiplexLine2Var,
    values=('Not sent', 'VOLT_1', 'VOLT_2', 'VOLT_3', 'VOLT_4', 'VOLT_5',
            'VOLT_6', 'REL_ALTIMETER', 'VERTICAL_SPEED', 'ALTIMETER_MAX',
            'CURRENTMA', 'MILLIAH', 'CELL_TOT'
            'PPM'),
    state="readonly")
MultiplexLine2Box.grid(column=1, row=3, pady=(10, 5), sticky=('W'))
MultiplexLine3Box = ttk.Combobox(
    fMultiplex,
Пример #4
0
#define PPM_MIN_100       988     // default 1500 - 512 ; // pulse width (usec) when TX sends a channel = -100
#define PPM_PLUS_100      2012    // default 1500 + 512 ; // pulse width (usec) when TX sends a channel = +100

#define PPM_VIA_SPORT             // uncomment this line to get ppm data over SPORT protocol instead of from a PWM channel (it requires a Tx with openTx running LUA script)

#fPpmType = ttk.Frame(fPpm)
fPpmType.grid(column=1, row=8)  #by default make it visible

ttk.Label(fPpm, text="Ppm type").grid(column=0,
                                      row=1,
                                      padx=5,
                                      pady=10,
                                      sticky=W)
ppmTypeBox = ttk.Combobox(fPpm,
                          textvariable=ppmTypeVar,
                          values=('Rx chanel', "Sport"),
                          state="readonly",
                          width=12)
ppmTypeBox.bind('<<ComboboxSelected>>', ppmTypeChanged)
ppmTypeBox.grid(column=1, row=1, padx=10)

ttk.Label(fPpmType, text="Pin").grid(column=0, row=0, padx=5, pady=10)

ppmPinBox = ttk.Combobox(fPpmType,
                         textvariable=ppmPinVar,
                         values=('2', '3'),
                         state="readonly",
                         width=2)
ppmPinBox.grid(column=1, row=0, padx=10, pady=10)

ttk.Label(fPpmType, text="nbr of micro seconds for ppm = -100").grid(column=0,
Пример #5
0
#define AIRSPEED_SENSOR_USE       NO_AIRSPEED       // select between NO_AIRSPEED , MS4525 , MPXV7002

#define AIRSPEED_AT_SEA_LEVEL_AND_15C // if this line is commented, airspeed is calculated using baro pressure and temperature (so being "true" airspeed instead of normalised airspeed)      
#define AIRSPEED_IN_KMH  // uncomment this line if airspeed has to be in km/h instead of knot/h ( except some old versions, openTx expects knot/h) 

#define AIRSPEED_RESET_AT_PPM   100

#define COMPENSATION_MIN_AT_PPM 60
#define COMPENSATION_MAX_AT_PPM 90
#define COMPENSATION_PPM_MIN  80
#define COMPENSATION_PPM_MAX 140

ttk.Label(fAirspeed, text="Type of sensor").grid(row=1, sticky=E , pady=(20,2))
airspeedTypeBox = ttk.Combobox(fAirspeed, textvariable=airspeedTypeVar, 
                values=( "MS4525" , "MPXV7002" ),
                state="readonly")
airspeedTypeBox.grid(column=1 , sticky=W , row=1, padx=5)
ttk.Checkbutton(fAirspeed, text='Airspeed at sea level and 15 degree Celsius',  variable=airspeedAtSea15CVar,
	    onvalue='On', offvalue='Off').grid(row=2, sticky=(W), padx=10 , pady=(20,2))
ttk.Checkbutton(fAirspeed, text='Airspeed in km/h (otherwise in knot/h as expected by openTx)',  variable=airspeedInKmhVar,
	    onvalue='On', offvalue='Off').grid(row=3, sticky=(W,E), padx=10 , pady=(20,2))

ttk.Label(fAirspeed, text="Reset airspeed when ppm is (%)").grid(row=4, sticky=(E), pady=(20,2))
airspeedResetAtPpmBox = Spinbox(fAirspeed , from_=0, to=100, width = 5 , textvariable=airspeedResetAtPpmVar ) 
airspeedResetAtPpmBox.grid(column=1, row=4 , sticky=W,  padx=5, pady=(20,2))

ttk.Label(fAirspeed, text="Min Compensation when ppm is (%)").grid(row=5, sticky=(E), pady=(20,2))
airspeedCompMinAtPpmBox = Spinbox(fAirspeed , from_=0, to=100, width = 5 , textvariable=airspeedCompMinAtPpmVar ) 
airspeedCompMinAtPpmBox.grid(column=1, row=5 , sticky=W,  padx=5, pady=(20,2))
Пример #6
0
                offvalue='Off').grid(column=1, row=3, sticky=(W, E), padx=20)
ttk.Checkbutton(fVoltage, variable=volt2Exist, onvalue='On',
                offvalue='Off').grid(column=2, row=3, sticky=(W, E), padx=20)
ttk.Checkbutton(fVoltage, variable=volt3Exist, onvalue='On',
                offvalue='Off').grid(column=3, row=3, sticky=(W, E), padx=20)
ttk.Checkbutton(fVoltage, variable=volt4Exist, onvalue='On',
                offvalue='Off').grid(column=4, row=3, sticky=(W, E), padx=20)
ttk.Checkbutton(fVoltage, variable=volt5Exist, onvalue='On',
                offvalue='Off').grid(column=5, row=3, sticky=(W, E), padx=20)
ttk.Checkbutton(fVoltage, variable=volt6Exist, onvalue='On',
                offvalue='Off').grid(column=6, row=3, sticky=(W, E), padx=20)
#command= volt1Changed,

volt1PinBox = ttk.Combobox(fVoltage,
                           textvariable=volt1PinVar,
                           values=('0', "1", "2", "3", "4", "5", "6", "7"),
                           state="readonly",
                           width=1)
volt1PinBox.grid(column=1, row=4, padx=10)
volt2PinBox = ttk.Combobox(fVoltage,
                           textvariable=volt2PinVar,
                           values=('0', "1", "2", "3", "4", "5", "6", "7"),
                           state="readonly",
                           width=1)
volt2PinBox.grid(column=2, row=4, padx=10)
volt3PinBox = ttk.Combobox(fVoltage,
                           textvariable=volt3PinVar,
                           values=('0', "1", "2", "3", "4", "5", "6", "7"),
                           state="readonly",
                           width=1)
volt3PinBox.grid(column=3, row=4, padx=10)
Пример #7
0
        onvalue='On', offvalue='Off').grid(row=8, sticky=(W,E), padx=20 , pady=5)
ttk.Checkbutton(fMain, text='Magn. (HMC5883)',  command=magnetChanged, variable=magnetExist,
        onvalue='On', offvalue='Off').grid(row=9, sticky=(W,E), padx=20 , pady=5)
ttk.Checkbutton(fMain, text='Flow sensor',  command=flowChanged, variable=flowExist,
        onvalue='On', offvalue='Off').grid(row=10, sticky=(W,E), padx=20 , pady=5)
ttk.Checkbutton(fMain, text='External ADC (ADS1115)',  command=adcChanged, variable=adcExist,
        onvalue='On', offvalue='Off').grid(row=11, sticky=(W,E), padx=20 , pady=5)
ttk.Checkbutton(fMain, text='Locator',  command=locatorChanged, variable=locatorExist,
        onvalue='On', offvalue='Off').grid(row=12, sticky=(W,E), padx=20 , pady=5)
ttk.Checkbutton(fMain, text='Sequencer',  command=sequenceChanged, variable=sequenceExist,
        onvalue='On', offvalue='Off').grid(row=13, sticky=(W,E), padx=20 , pady=5)
ttk.Checkbutton(fMain, text='Extra fields (TEST 1,2,3)',  command=addFieldsChanged, variable=addFieldsExist,
        onvalue='On', offvalue='Off').grid(row=14, sticky=(W,E), padx=20 , pady=5)

ttk.Label(fMain, text="Protocol of Rx").grid(column=0, row=15, pady=(20,2))
protocolBox = ttk.Combobox(fMain, textvariable=protocolVar, state = 'readonly' , 
                values=('FRSKY_SPORT', 'JETI', 'HOTT', 'MULTIPLEX', 'FRSKY_HUB' , 'FRSKY_SPORT_HUB'))
protocolBox.bind('<<ComboboxSelected>>', protocolChanged)
protocolBox.grid(column=1, row=15 , pady=(20,2) )

ttk.Label(fMain, text="Pin used for telemetry").grid(column=0, row=16, pady=(5,2))
pinToRxBox = ttk.Combobox(fMain, textvariable=pinToRxVar, 
                values=('4', '2'), state='readonly',  width=2)
pinToRxBox.grid(column=1, row=16, pady=(5,2))

nb.add(fMain, text='Main')
nb.add(fPpm, text='Ppm', state=HIDDEN)
nb.add(fVario, text='Vario', state=HIDDEN)
nb.add(fVoltage, text='Voltages', state=HIDDEN)
nb.add(fCurrent, text='Current', state=HIDDEN)
nb.add(fGps, text='GPS', state=HIDDEN)
nb.add(fAirspeed, text='Airspeed', state=HIDDEN)
Пример #8
0
from oxsConfig import ttk, W, E, fGps, gps3dExist, gpsRateVar

#here start the definition of the GPS tab
#define GPS_SPEED_3D      // uncomment this line if GPS speed has to be the 3d speed instead of the 2d speed (note: 3d is probably less accurate - to test)
#define GPS_REFRESH_RATE  5       // rate at which GPS sent new data; select between 1, 5 or 10 (Hz). Default = 5 Hz; Ublox NEO6 does not support 10 hz
ttk.Label(fGps, text="3D speed").grid(column=0,
                                      row=1,
                                      padx=(15, 5),
                                      pady=25,
                                      sticky=(E))
ttk.Checkbutton(fGps, variable=gps3dExist, onvalue='On',
                offvalue='Off').grid(column=1, row=1, sticky=('W', 'E'))
ttk.Label(fGps, text="Refresh rate (Hz)").grid(column=0,
                                               row=2,
                                               padx=(15, 5),
                                               pady=5,
                                               sticky=(E))
gpsRateBox = ttk.Combobox(fGps,
                          textvariable=gpsRateVar,
                          values=('1', "5", "10"),
                          state="readonly",
                          width=2)
gpsRateBox.grid(column=1, row=2, sticky=(W))
Пример #9
0
from oxsConfig import ttk, W, E, fJeti, jetiTemperatureSourceVar, jetiVoltageSourceVar

#define VOLTAGE_SOURCE   VOLT_1                     // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
#define TEMPERATURE_SOURCE NTC                   // select between MS5611 and NTC

ttk.Label(fJeti, text="Voltage source").grid(column=0,
                                             row=1,
                                             padx=(15, 5),
                                             pady=(10, 5),
                                             sticky=('E'))
ttk.Label(fJeti, text="Temperature source").grid(column=0,
                                                 row=2,
                                                 pady=(15, 5),
                                                 sticky=('WE'))
jetiVoltageSourceBox = ttk.Combobox(fJeti,
                                    textvariable=jetiVoltageSourceVar,
                                    values=('Not sent', 'VOLT_1', 'VOLT_2',
                                            'VOLT_3', 'VOLT_4', 'VOLT_5',
                                            'VOLT_6'),
                                    state="readonly")
jetiVoltageSourceBox.grid(column=1, row=1, pady=(15, 5), sticky=('W'))
jetiTemperatureSourceBox = ttk.Combobox(fJeti,
                                        textvariable=jetiTemperatureSourceVar,
                                        values=('Not sent', 'MS5611', 'NTC'),
                                        state="readonly")
jetiTemperatureSourceBox.grid(column=1, row=2, pady=(15, 5), sticky=('W'))
Пример #10
0
                                               pady=5,
                                               sticky=(E))
ttk.Label(fCurrent, text="R to ground").grid(column=0,
                                             row=4,
                                             padx=(15, 5),
                                             pady=5,
                                             sticky=(E))
ttk.Label(fCurrent, text="R to current sensor").grid(column=0,
                                                     row=5,
                                                     padx=(15, 5),
                                                     pady=5,
                                                     sticky=(E))

currentPinBox = ttk.Combobox(fCurrent,
                             textvariable=currentPinVar,
                             values=('0', "1", "2", "3", "4", "5", "6", "7"),
                             state="readonly",
                             width=1)
currentPinBox.grid(column=1, row=1)

currentMvoltAt0Box = ttk.Entry(fCurrent,
                               textvariable=currentMvoltAt0Var,
                               width='5')
currentMvoltAt0Box.grid(column=1, row=2)

currentMvoltPerAmpBox = ttk.Entry(fCurrent,
                                  textvariable=currentMvoltPerAmpVar,
                                  width='5')
currentMvoltPerAmpBox.grid(column=1, row=3)

currentRgBox = ttk.Entry(fCurrent, textvariable=currentRgVar, width='5')
Пример #11
0
                                            row=6,
                                            padx=(15, 5),
                                            pady=(10, 5),
                                            sticky=('E'))
ttk.Label(fHott, text="Temperature 2").grid(column=0,
                                            row=7,
                                            padx=(15, 5),
                                            pady=(10, 5),
                                            sticky=('E'))
hottCellUndervoltageBox = ttk.Entry(fHott,
                                    textvariable=hottCellUndervoltageVar,
                                    width='6')
hottCellUndervoltageBox.grid(column=1, row=1, sticky=('W'), pady=(10, 5))
hottBattery1SourceBox = ttk.Combobox(
    fHott,
    textvariable=hottBattery1SourceVar,
    values=('Not sent', 'VOLT_1', 'VOLT_2', 'VOLT_3', 'VOLT_4', 'VOLT_5',
            'VOLT_6', 'ADS_VOLT_1', 'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4'),
    state="readonly")
hottBattery1SourceBox.grid(column=1, row=3, pady=(10, 5), sticky=('W'))
hottBattery2SourceBox = ttk.Combobox(
    fHott,
    textvariable=hottBattery2SourceVar,
    values=('Not sent', 'VOLT_1', 'VOLT_2', 'VOLT_3', 'VOLT_4', 'VOLT_5',
            'VOLT_6', 'ADS_VOLT_1', 'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4'),
    state="readonly")
hottBattery2SourceBox.grid(column=1, row=4, pady=(10, 5), sticky=('W'))
hottMainBatterySourceBox = ttk.Combobox(
    fHott,
    textvariable=hottMainBatterySourceVar,
    values=('Not sent', 'VOLT_1', 'VOLT_2', 'VOLT_3', 'VOLT_4', 'VOLT_5',
            'VOLT_6', 'ADS_VOLT_1', 'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4'),