fixes
This commit is contained in:
parent
9393cebf37
commit
2c3cfd21a8
4
Car.py
4
Car.py
@ -69,8 +69,8 @@ class Car:
|
||||
|
||||
def conduite(self,vmax,leader,dt):
|
||||
if(leader is None):
|
||||
self.v=vmax
|
||||
return
|
||||
vleader=self.v
|
||||
bleader=self.b
|
||||
else:
|
||||
vleader=leader.v # vitesse de la voiture leader
|
||||
bleader=leader.b
|
||||
|
3
main.py
3
main.py
@ -44,6 +44,9 @@ class MainWindow(QMainWindow):
|
||||
if e.key() == Qt.Key_Escape or e.key() == Qt.Key_Q:
|
||||
self.close()
|
||||
|
||||
elif e.key() == Qt.Key_S:
|
||||
self.mainLoop.quickLoad()
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication()
|
||||
|
||||
|
@ -36,5 +36,11 @@ class mainLoop():
|
||||
if(self.map.isLoaded()):
|
||||
self.controller.prepareRoute()
|
||||
|
||||
def quickLoad(self):
|
||||
self.map.fromPath("test2.net.xml")
|
||||
self.painter.generateTransform()
|
||||
self.controller.fromPath("test5.rou.xml")
|
||||
self.controller.prepareRoute()
|
||||
|
||||
def addInfosDisplay(self, widget):
|
||||
self.controller.setInfoWidget(widget)
|
||||
|
Loading…
x
Reference in New Issue
Block a user