Module handling extracting voltage and current of batteries connected to pichawk via mavlink.
- Computer with Windows
- Installed Mission Planner, Python3 and git
- Download com0com binary (https://sourceforge.net/projects/com0com/)
- Install com0com. Select CNCA0 <-> CNCB0 and COM# <-> COM# components.
- Run com0com and create 2 viratual COM-CNC ports pairs.
- Download hub4com binary (https://drive.google.com/file/d/1Tu9aX4mCEOHgi2uEXvhgcwaqeJsB-Luq/view?usp=sharing) 5Create python virtual environment and then install required libraries
pip install -r requirements.txt
From command prompt go to folder containing hub4com.exe adn run:
hub4com.exe --octs=off --route=0:1,2 --baud=<baudRate> \\.\COM12 \\.\CNCA0 \\.\CNCA1
<baudRate> - replace with baud rate, typically 57600
COM12 - port to which pixhawk antenna is connected
CNCA0, CNCA1 - virtual ports created during installation
Remember to plug in antenna before running this command!
Run Mission Planner and connect it to COM port from first virtual port pair used in hub4com command.
In command prompt go to folder with your virtual environment and then its Script folder. Run activate.bat to activate python's virtual environment. In this environment go to folder containing cloned repository and run:
python main.py --port COM14
where COM14 is second virtual prot pair used in hub4com command.