Skip to content

Instantly share code, notes, and snippets.

@BK1031
Last active July 9, 2024 22:20
Show Gist options
  • Save BK1031/ba3cd961dd25120c1e892a2c9ca2dbb2 to your computer and use it in GitHub Desktop.
Save BK1031/ba3cd961dd25120c1e892a2c9ca2dbb2 to your computer and use it in GitHub Desktop.
racecar_analytics structs
package main
import (
"time"
)
type ECU struct {
ID int `json:"id"`
MotorRPM int `json:"motor_rpm"`
Speed int `json:"speed"`
Throttle int `json:"throttle"`
BrakePressure int `json:"brake_pressure"`
CreatedAt time.Time `json:"created_at"`
}
type Battery struct {
ID int `json:"id"`
ChargeLevel int `json:"charge_level"`
CellTemp1 int `json:"cell_temp_1"`
CellTemp2 int `json:"cell_temp_2"`
CellTemp3 int `json:"cell_temp_3"`
CellTemp4 int `json:"cell_temp_4"`
CellVoltage1 int `json:"cell_voltage_1"`
CellVoltage2 int `json:"cell_voltage_2"`
CellVoltage3 int `json:"cell_voltage_3"`
CellVoltage4 int `json:"cell_voltage_4"`
CreatedAt time.Time `json:"created_at"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment