model

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Battery

type Battery struct {
	Chemistry     string  `yaml:"chemistry"` // e.g. "Li-ion"
	VoltageV      float64 `yaml:"voltage_v"` // nominal
	MaxCurrentA   float64 `yaml:"max_current_a"`
	CapacityAh    float64 `yaml:"capacity_ah"`
	CRating       float64 `yaml:"c_rating"`
	MaxDischargeA float64 `yaml:"max_discharge_a"`
}

type I2CAddress

type I2CAddress uint16

func (*I2CAddress) UnmarshalYAML

func (a *I2CAddress) UnmarshalYAML(value *yaml.Node) error

type I2CBus

type I2CBus struct {
	Name    string      `yaml:"name"`
	Devices []I2CDevice `yaml:"devices"`
}

type I2CDevice

type I2CDevice struct {
	Part       string     `yaml:"part,omitempty"`
	Name       string     `yaml:"name"`
	AddressHex I2CAddress `yaml:"address_hex"`
}

type MCU

type MCU struct {
	Part             string  `yaml:"part,omitempty"`
	Name             string  `yaml:"name"`
	LogicVoltageV    float64 `yaml:"logic_voltage_v"` // usually 3.3 for ESP32
	MaxGPIOCurrentmA float64 `yaml:"max_gpio_current_ma"`
}

type Motor

type Motor struct {
	Part            string  `yaml:"part,omitempty"`
	Name            string  `yaml:"name"`
	Count           int     `yaml:"count"`
	VoltageMinV     float64 `yaml:"voltage_min_v"`
	VoltageMaxV     float64 `yaml:"voltage_max_v"`
	StallCurrentA   float64 `yaml:"stall_current_a"`
	NominalCurrentA float64 `yaml:"nominal_current_a"`
}

type MotorDriver

type MotorDriver struct {
	Part             string  `yaml:"part,omitempty"`
	Name             string  `yaml:"name"`
	MotorSupplyMinV  float64 `yaml:"motor_supply_min_v"`
	MotorSupplyMaxV  float64 `yaml:"motor_supply_max_v"`
	ContinuousPerChA float64 `yaml:"continuous_per_channel_a"`
	PeakPerChA       float64 `yaml:"peak_per_channel_a"`
	Channels         int     `yaml:"channels"`
	LogicVoltageMinV float64 `yaml:"logic_voltage_min_v"`
	LogicVoltageMaxV float64 `yaml:"logic_voltage_max_v"`
}

type PowerSpec

type PowerSpec struct {
	Battery Battery `yaml:"battery"`
	Rail    Rail    `yaml:"logic_rail"` // main logic rail after regulation
}

type Rail

type Rail struct {
	VoltageV    float64 `yaml:"voltage_v"`     // e.g. 5.0
	MaxCurrentA float64 `yaml:"max_current_a"` // regulator output capability
}

type RobotSpec

type RobotSpec struct {
	Name     string      `yaml:"name"`
	Power    PowerSpec   `yaml:"power"`
	Motors   []Motor     `yaml:"motors"`
	Driver   MotorDriver `yaml:"motor_driver"`
	MCU      MCU         `yaml:"mcu"`
	I2CBuses []I2CBus    `yaml:"i2c_buses"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL