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

Request: enable sending log data via the term. #47

Open
owhite opened this issue Feb 12, 2023 · 1 comment
Open

Request: enable sending log data via the term. #47

owhite opened this issue Feb 12, 2023 · 1 comment

Comments

@owhite
Copy link
Collaborator

owhite commented Feb 12, 2023

Suggestion two levels of complicity for this.

FIRST VERSION:
User select items for configuring the payload with a command like
status log init
To configure:

  • frequency the payload is sent
  • output format (e.g., "json", "csv") of payload
  • values to send, where the values correspond to what's available from get

json format is shown below. Then when the user makes the call:
status log send

the device starts sending the payload.

Also: get should show board temp, motor temp and vbat_volts. :-)

SECOND (EASIER) VERSION:
If all of that is too complicated for now, much simpler, create a print statement that prints:

{"amps": 10, "volts": 20, "rpm": 30, "btemp": 40, "mtemp": 50}

and I'll just configure the print to send whatever I need.

@davidmolony
Copy link
Owner

It would be very nice as well to have a second state that in the event of a crash/error state prints the values of the logged variables.
void logVars(MESC_motor_typedef *_motor) implements this and is called from the hyperloop.
sampled_vars is the struct currently used for this as a ringbuffer; not used for both motors. Might want to make it configurable to sample either motor if we actually ever use two motors, but do not want two seperate buffers.

Printing the contents of this to the terminal/ESP32/whatever hopefully means that we can capture the events that led up to a trip/fire.

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

No branches or pull requests

2 participants