diff --git a/Nasal/auto_hold.nas b/Nasal/auto_hold.nas index fc4da8e..9c899d3 100644 --- a/Nasal/auto_hold.nas +++ b/Nasal/auto_hold.nas @@ -22,21 +22,21 @@ var autoHoldMainLoop = func(){ if(!door1.getpos() and !door2.getpos() and !door3.getpos() and !door4.getpos() and engineNode.getValue()){ followme.brakeController.applyBrakes(1); working = 1; - workingNode.setValue(1); + workingNode.setIntValue(1); }else{ stopAndSwitchToParking(); } }else if(!math.round(currentSpeed)){ followme.brakeController.applyBrakes(0); working = 0; - workingNode.setValue(0); + workingNode.setIntValue(0); } } } var stopAndSwitchToParking = func(){ followme.brakeController.applyBrakes(0); working = 0; - workingNode.setValue(0); + workingNode.setIntValue(0); followme.brakeController.enableHandBrake(); } @@ -45,17 +45,17 @@ var autoHoldTimer = maketimer(0.05,autoHoldMainLoop); var startAutoHold = func(){ autoHoldTimer.start(); active = 1; - activeNode.setValue(1); + activeNode.setIntValue(1); } var stopAutoHold = func(){ active = 0; - activeNode.setValue(0); + activeNode.setIntValue(0); autoHoldTimer.stop(); currentSpeed = speedNode.getValue(); if(followme.brakeController.applyingFeetBrake){ working = 0; - workingNode.setValue(0); + workingNode.setIntValue(0); followme.brakeController.applyBrakes(0); }else if(!math.round(currentSpeed)){ stopAndSwitchToParking(); diff --git a/Nasal/systems.nas b/Nasal/systems.nas index b673884..15c9484 100644 --- a/Nasal/systems.nas +++ b/Nasal/systems.nas @@ -551,7 +551,7 @@ var Safety = { me.aebEnabled = 1; me.frontRadar.initWithoutStarting(); #//me.frontRadar.stop(); - me.aebOnProp.setValue(1); + me.aebOnProp.setIntValue(1); print("AEB enabled"); }, disableAEB: func(){ @@ -559,7 +559,7 @@ var Safety = { me.aebTimer.stop(); if(me.aebEnabled) me.frontRadar.stop(); me.aebEnabled = 0; - me.aebOnProp.setValue(0); + me.aebOnProp.setIntValue(0); print("AEB disabled"); }, toggleAEB: func(){ @@ -583,9 +583,9 @@ var Safety = { print("AEB Slow Mode"); }, aebFastMode: func(){ - me.frontRadar.maxRange = 18; + me.frontRadar.maxRange = 20; #me.frontRadar.maxWidth = 0.05; - me.aebThreshold = 18; + me.aebThreshold = 20; me.aebFullThreshold = 16; me.aebMode = 2; print("AEB Fast Mode"); @@ -653,7 +653,7 @@ var Safety = { if(currentSpeed <= 0){ me.aebStop(); #print("1"); - }else if(me.aebCount >= 20){ + }else if(me.aebCount >= 15){ me.aebStop(); #print("2"); } @@ -664,7 +664,7 @@ var Safety = { if(currentSpeed <= 0){ me.aebStop(); #print("11"); - }else if(me.aebCount >= 20){ + }else if(me.aebCount >= 15){ me.aebStop(); #print("22"); }