Compare commits
No commits in common. "5a1734f181efdb739cbf2b91be41770576e970e5" and "f3775e7d01eaa24f0ab30a6891be06bff9efeece" have entirely different histories.
5a1734f181
...
f3775e7d01
|
@ -106,9 +106,9 @@ int16_t max_acceleration_rate=NORMAL_MAX_ACCELERATION_RATE; //maximum cmd send i
|
|||
//Driving parameters
|
||||
int16_t minimum_constant_cmd_reduce=1; //reduce cmd every loop by this constant amount when freewheeling/braking
|
||||
int16_t brake_cmdreduce_proportional=500; //cmd gets reduced by an amount proportional to brake position (ignores freewheeling). cmd_new-=brake_cmdreduce_proportional / second @ full brake. with BREAK_CMDREDUCE_CONSTANT=1000 car would stop with full brake at least after a second (ignoring influence of brake current control/freewheeling)
|
||||
float startbrakecurrent=2.0; //Ampere. "targeted brake current @full brake". at what point to start apply brake proportional to brake_pos. for everything above that cmd is reduced by freewheel_break_factor
|
||||
float startbrakecurrent=2; //Ampere. "targeted brake current @full brake". at what point to start apply brake proportional to brake_pos. for everything above that cmd is reduced by freewheel_break_factor
|
||||
float startbrakecurrent_offset=0.13; //offset start point for breaking, because of reading fluctuations around 0A. set this slightly above idle current reading
|
||||
float freewheel_break_factor=200.0; //speed cmd units per amp per second. 1A over freewheel_current decreases cmd speed by this amount (on average). Was 500 until 20240809
|
||||
float freewheel_break_factor=500.0; //speed cmd units per amp per second. 1A over freewheel_current decreases cmd speed by this amount (on average)
|
||||
float reverse_speed=0.25; //reverse driving speed //0 to 1
|
||||
int16_t throttle_max=1000; //maximum allowed set speed. used for scaling and limiting. [0,1000]
|
||||
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
import serial
|
||||
import os
|
||||
import time
|
||||
import random
|
||||
import string
|
||||
|
||||
import argparse
|
||||
chunksize=4096
|
||||
|
||||
#LOG0002
|
||||
|
@ -154,20 +150,6 @@ def delete_file(filename):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(description='Transfers log files from bobbycar over serial')
|
||||
parser.add_argument('-o', '--output', nargs='?', help="output directory")
|
||||
parser.add_argument('-d','--delete', action="store_true", help="delete files after transfer")
|
||||
args = parser.parse_args()
|
||||
outputfolder="sdcard"
|
||||
if (args.output is not None):
|
||||
outputfolder = args.output
|
||||
if(outputfolder[-1]=='/'):
|
||||
outputfolder=outputfolder[:-1] #remove last slash
|
||||
print("Outputfolder:"+outputfolder)
|
||||
|
||||
|
||||
if serialport.isOpen():
|
||||
|
||||
establish_connection()
|
||||
|
@ -187,7 +169,7 @@ if __name__ == "__main__":
|
|||
expectedsize=get_filesize(filename)
|
||||
print("Expecting "+str(expectedsize)+" Byte")
|
||||
|
||||
writefilename=outputfolder+'/'+filename
|
||||
writefilename='sdcard/'+filename
|
||||
receivedsize=copy_file(filename,writefilename,expectedsize)
|
||||
|
||||
if (expectedsize!=receivedsize):
|
||||
|
@ -201,21 +183,12 @@ if __name__ == "__main__":
|
|||
|
||||
|
||||
#Delete all files
|
||||
if (args.delete):
|
||||
if (failed>0):
|
||||
print("Copy not successful. Files won't be deleted!")
|
||||
exit()
|
||||
deletecheckstring=''.join(random.choices(string.ascii_lowercase, k=3))
|
||||
deletecheck=input("Enter "+deletecheckstring+" to confirm deletion of "+str(len(filenames))+" files on bobbycar:")
|
||||
|
||||
if (deletecheck==deletecheckstring):
|
||||
log_off()
|
||||
for filename in filenames:
|
||||
print("Deleting "+filename)
|
||||
delete_file(filename)
|
||||
else:
|
||||
print("Verification failed!")
|
||||
|
||||
'''
|
||||
log_off()
|
||||
for filename in filenames:
|
||||
delete_file(filename)
|
||||
'''
|
||||
|
||||
|
||||
serialport.write("echo on\n".encode())
|
||||
|
|
Loading…
Reference in New Issue