Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FC blackbox integration #99

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

singlag
Copy link

@singlag singlag commented Jan 8, 2023

Extra function for some FC not have on board storage/tf card and don't want to buy open lager
It will dump the serial port data to file depend on FC setting (by checking the "/blackbox/dump_tty_date '+%Y%m%d-%H%M%S'.log", file should be 0KB before ARM)

  • when MSP is enable at betaflight, will stop dump serial port data and remove file
  • when serial port set for "blackbox logging", serial data will save at "/blackbox/dump_tty_date '+%Y%m%d-%H%M%S'.log"

enable "Fast serial" and disable some blackbox headers to save logging overhead
example for filter tuning :
blackbox_disable_bat = ON
blackbox_disable_mag = ON
blackbox_disable_alt = ON
blackbox_disable_rssi = ON
blackbox_disable_acc = ON
blackbox_disable_gps = ON

blackbox_disable_pids = ON
blackbox_disable_rc = ON
blackbox_disable_setpoint = OFF
blackbox_disable_gyro = OFF
blackbox_disable_debug = OFF
blackbox_disable_motors = ON

blackbox_sample_rate = 1/4
blackbox_device = SERIAL
serial 1 128 230400 57600 0 230400

example blackbox log by airunit :
https://drive.google.com/file/d/1P9ec8A5KaPk-B-X7xyCkKzkZl2Nvf1eA/view?usp=share_link

Extra function for some FC not have on board storage/tf card and don't want to buy open lager
it will start dump the serial port data to file depend on FC setting (by checking the "/blackbox/dump_tty_`date '+%Y%m%d-%H%M%S'`.log", file should be 0KB before ARM)
- when MSP is enable at betaflight, will stop dump serial port data and remove file
- when serial port set for "blackbox logging", serial data will save at "/blackbox/dump_tty_`date '+%Y%m%d-%H%M%S'`.log"

enable "Fast serial" and disable some blackbox headers to save logging overhead, enough for basic filter/pid tuning
Betaflight setting :
blackbox_disable_bat = ON
blackbox_disable_mag = ON
blackbox_disable_alt = ON
blackbox_disable_rssi = ON
blackbox_disable_acc = ON
blackbox_disable_gps = ON


blackbox_disable_pids = ON
blackbox_disable_rc = ON
blackbox_disable_setpoint = OFF
blackbox_disable_gyro = OFF
blackbox_disable_debug = OFF
blackbox_disable_motors = ON

blackbox_sample_rate = 1/4
blackbox_device = SERIAL
serial 1 128 230400 57600 0 230400

example blackbox log by airunit :
https://drive.google.com/file/d/1P9ec8A5KaPk-B-X7xyCkKzkZl2Nvf1eA/view?usp=share_link
@benlumley
Copy link
Collaborator

Feels like this should be its own package rather than part of msp osd?

But is this currently the only way because of how msp osd hijacks the msp steam?

@singlag
Copy link
Author

singlag commented Feb 1, 2023

Feels like this should be its own package rather than part of msp osd?

But is this currently the only way because of how msp osd hijacks the msp steam?

because msp-osd already do everything about hijacks the msp steam, and if create another package for "blackbox logging", it may conflicts if msp-osd / "blackbox logging" are both running

@bri3d
Copy link
Collaborator

bri3d commented Feb 1, 2023

I think we should implement this switching functionality at either as a separate package at a higher level using dini (stop the mux service, check the port for data, and swap to blackbox if there's no data, otherwise start it) or by implementing a feature in msp_displayport_mux to pass raw data into a UDP endpoint and writing a logger based on that. This startup script based approach seems super fragile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants