Skip to content

Instantly share code, notes, and snippets.

View bryanmonti's full-sized avatar

Bryan Monti bryanmonti

View GitHub Profile
#!/usr/bin/env python3
#
# Dependencies:
# drwatson - clone https://github.com/zubax/drwatson into the same directory this script run from.
#
# Run with sudo. ie, 'sudo python3 firmware_uploader.py FIRMWARE.bin'
#
# Use this at your own will
from drwatson import CLIWaitCursor, load_firmware_via_gdb, download_newest, glob_one, open_serial_port, download
acc_systems@acc-systems-toshiba-amd-a8:~/zubax_orel/tools/drwatson$ tail -n 100 *.log
2018-04-02 15:53:19,143 INFO uavcan.driver.slcan Init: Ignoring byte b'0' while waiting for ACK
2018-04-02 15:53:19,143 INFO uavcan.driver.slcan Init: Ignoring byte b'0' while waiting for ACK
2018-04-02 15:53:19,245 INFO uavcan.driver.slcan RX worker started
2018-04-02 15:53:19,246 INFO uavcan.driver.slcan IO process initialization complete
2018-04-02 15:53:19,245 INFO uavcan.driver.slcan RX worker started
2018-04-02 15:53:19,246 INFO uavcan.driver.slcan IO process initialization complete
2018-04-02 15:53:19,253 DEBUG uavcan.app.dynamic_node_id [CentralizedServer] AllocationTable update: 127 None
2018-04-02 15:53:19,254 DEBUG drwatson_ui INFO
Waiting for the node to show up on the CAN bus...
ystems-toshiba-amd-a8:~/zubax_orel/tools/drwatson$ tail -n 100 *.log
2018-03-26 16:12:42,272 DEBUG drwatson_ui INPUT RESPONSE
2018-03-26 16:12:42,273 DEBUG drwatson_ui INPUT REQUEST
1. Connect DroneCode Probe to the debug connector.
2. Connect CAN to the first CAN1 connector on the device; terminate the other CAN1 connector.
4. Connect an appropriate power supply (see the hardware specs for requirements).
Make sure the motor leads are NOT CONNECTED to anything.
5. If you want to skip firmware upload, type F.
6. Press ENTER.
################## PAIRS.properties ##############################
################### VERSION CONTROL ###############################
### Read the wiki for more explanations about the properties ###
### https://github.com/taniman/profit-trailer/wiki ###
### ###
### OCT 23, 2017 Add file version control ###
### NOV 05, 2017 Add new property ALL_stop_loss_timeout ###
### NOV 05, 2017 Add new property ALL_DCA_enabled_trigger ###
### DEC 11, 2017 Remove property ALL_DCA_enabled_trigger ###
###################################################################
################## application.properties #########################
################### VERSION CONTROL ###############################
###################################################################
### OCT 21, 2017 Change format for server.timeZoneOffset +hh:mm ###
### OCT 25, 2017 Removed server.port, server.additionalPort, ###
### commented out server.timeZoneOffset, server.sitename, ###
### and server.password. ###
### Added trading.logHistory = 2 ###
### OCT 28, 2017 removed "" from server.password value ###
### Changed comment explanation for api keys ###
/**
The MIT License (MIT)
Copyright (c) 2016 by Daniel Eichhorn
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
nsh> uavcan status
Pool allocator status:
Capacity hard/soft: 500/250 blocks
Reserved: 11 blocks
Allocated: 5 blocks
UAVCAN node status:
Internal failures: 0
Transfer errors: 2
RX transfers: 879170
TX transfers: 22954
x + CAL_MAG0_ID [59,78] : 262434
x CAL_MAG0_ROT [60,79] : -1
x + CAL_MAG0_XOFF [61,80] : 0.0905
x + CAL_MAG0_XSCALE [62,81] : 1.0149
x + CAL_MAG0_YOFF [63,82] : 0.2269
x + CAL_MAG0_YSCALE [64,83] : 0.9994
x + CAL_MAG0_ZOFF [65,84] : 0.3460
x + CAL_MAG0_ZSCALE [66,85] : 0.9844
x + CAL_MAG1_ID [67,86] : 131874
x + CAL_MAG1_ROT [68,87] : 0
INFO [lib__ecl] val: 0.0131, lp: 0.0179 mean dev: 0.0000 RMS: 0.0065 conf: 1.0000
INFO [lib__ecl] val: 0.0004, lp: -0.0027 mean dev: 0.0000 RMS: 0.0133 conf: 1.0000
INFO [lib__ecl] val: -0.0063, lp: 0.0020 mean dev: 0.0000 RMS: 0.0077 conf: 1.0000
INFO [lib__ecl] sensor #2, prio: 99, state: OK
INFO [lib__ecl] val: -0.0021, lp: -0.0013 mean dev: -0.0000 RMS: 0.0036 conf: 1.0000
INFO [lib__ecl] val: -0.0025, lp: -0.0009 mean dev: 0.0000 RMS: 0.0125 conf: 1.0000
INFO [lib__ecl] val: 0.0020, lp: 0.0013 mean dev: 0.0000 RMS: 0.0062 conf: 1.0000
INFO [sensors] accel status:
INFO [lib__ecl] validator: best: 0, prev best: 0, failsafe: NO (0 events)
INFO [lib__ecl] sensor #0, prio: 254, state: OK
FATAL ERROR 3
io.px4.sapog 1.1 2.2.0f67ce73 / 2 WDTRESET
LED: 0x200028a4 registered at pos 0
Motor: PWM freq: 60000.000000; Effective steps: 600; ADC period: 16 usec
Motor: Forcing PWM min = half = 600
Motor: ADC blanking reduced from 691 to 264 ticks due to PWM frequency being too high
Motor: PWM range [600; 1199], ADC: advance 126 ticks, blanking 264 ticks, sample 336 ticks
Motor: PWM dead time 43 ticks
Motor: Timer resolution: 250 nanosec
Motor: RTCTL config: Max comm period: 4000 usec, BEMF window denom: 4