slotUI/slotCli.py

changeset 143
cb514887cf17
parent 139
7127e7082ee0
child 146
a1eb2dc83819
equal deleted inserted replaced
142:a933d44a6edc 143:cb514887cf17
225 sleep(0.5) 225 sleep(0.5)
226 self.box.progcar(slot, "brake", self.slot[slot]["profile"].getint("Settings", "Brake")) 226 self.box.progcar(slot, "brake", self.slot[slot]["profile"].getint("Settings", "Brake"))
227 sleep(0.5) 227 sleep(0.5)
228 self.box.speedlimit(slot, self.slot[slot]["limit"]) 228 self.box.speedlimit(slot, self.slot[slot]["limit"])
229 sleep(0.5) 229 sleep(0.5)
230 self.box.unlimitedfuel(slot, (self.slot[slot]["profile"].getint("Settings", "Fuel") == 0) )
231 sleep(0.5)
230 self.cleartop() 232 self.cleartop()
231 self.box.setmode(1) 233 self.box.setmode(1)
232 234
233 def readName(self, slot): 235 def readName(self, slot):
234 self.scr.nodelay(0) # enable delay on readkey 236 self.scr.nodelay(0) # enable delay on readkey
247 self.slot[slot]["profile"].read("profiles/" + name) 249 self.slot[slot]["profile"].read("profiles/" + name)
248 self.slot[slot]["name"] = self.slot[slot]["profile"].get("Settings", "Name") 250 self.slot[slot]["name"] = self.slot[slot]["profile"].get("Settings", "Name")
249 self.slot[slot]["limit"] = self.slot[slot]["profile"].getint("Settings", "Limit") 251 self.slot[slot]["limit"] = self.slot[slot]["profile"].getint("Settings", "Limit")
250 self.flash_car_settings(slot) 252 self.flash_car_settings(slot)
251 except IOError, err: 253 except IOError, err:
254 # load default profile
252 self.slot[slot]["profilename"] = "default" 255 self.slot[slot]["profilename"] = "default"
253 self.slot[slot]["profile"].read("profiles/default") 256 self.slot[slot]["profile"].read("profiles/default")
254 self.slot[slot]["limit"] = self.slot[slot]["profile"].getint("Settings", "Limit") 257 self.slot[slot]["limit"] = self.slot[slot]["profile"].getint("Settings", "Limit")
255 self.slot[slot]["name"] = name 258 self.slot[slot]["name"] = name
256 self.flash_car_settings(slot) 259 self.flash_car_settings(slot)

mercurial