hishizuka / pizero_bikecomputer

An open source bike computer based on Raspberry Pi Zero (W, WH, 2W) with GPS and ANT+. Including offline map and navigation.

Home Page:https://qiita.com/hishi/items/46619b271daaa9ad41b3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use --demo with my own .tcx file

3ZKDB opened this issue · comments

commented

Hey hishizuka,
as a complete novice I am trying to recreate your project with Pizero 2 W with a Adafruit Sharp Display.

I am currently demoing the raspberry over XRDP and I am unable to load a .tcx file when starting pizero_bikecomputer.py

The output is as follows:
Loading original modules...
config : 3.376206 sec
GPS : True
GPS_ADAFRUIT_UART : False
GPS_I2C : False
ANT : False
RPi GPIO : True
I2C : True
running build_ext
skipping '/home/pi/.pyxbld/temp.linux-armv7l-3.9/pyrex/modules/logger/cython/logger_fit.cpp' Cython extension (up-to-date)
skipping 'modules.logger.cython.logger_fit' extension (up-to-date)
logger_core : 1.428127 sec
Loading modules... done : 4.820308 sec
Raspberry Pi Zero 2 W Rev 1.0(BCM2835), serial:0xb4431714
logger_core : init...
detected I2c sensors:
PiTFT 2.8(r) : True
GPS/ANT+/I2C/GPIO/integrate/start: ['0.017962', '0.000565', '0.246051', '0.000136', '0.000180', '0.178859']
logger_core : init...
logger_core : loading course...
loading /home/pi/pizero_bikecomputer/course/course.tcx
logger_core : load_course : read tcx(regex): 1.098054 sec
Traceback (most recent call last):
File "/home/pi/pizero_bikecomputer/pizero_bikecomputer.py", line 51, in
main()
File "/home/pi/pizero_bikecomputer/pizero_bikecomputer.py", line 20, in main
logger = modules.logger_core.LoggerCore(config)
File "/home/pi/pizero_bikecomputer/modules/logger_core.py", line 119, in init
self.course.load()
File "/home/pi/pizero_bikecomputer/modules/logger/loader_tcx.py", line 84, in load
self.read_tcx()
File "/home/pi/pizero_bikecomputer/modules/logger/loader_tcx.py", line 180, in read_tcx
self.point_notes = list(np.array(self.point_notes)[not_straight_cond])
IndexError: boolean index did not match indexed array along dimension 0; dimension is 429 but corresponding boolean dimension is 431
^CException ignored in: <module 'threading' from '/usr/lib/python3.9/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 1428, in _shutdown
lock.acquire()
KeyboardInterrupt:

Are you able to upload a sample course.tcx to the repository?

Thank you for your great work!

Hi @3ZKDB ,

Thanks for using my program.

I usually use Ride with GPS TCX files.

I think my program is too optimized with Ride with GPS, so if you upload your TCX files, I'll check it.