1
0
forked from ROMEO/nexosim

Implement clonable outputs and add submodels example

This commit is contained in:
Jaŭhien Piatlicki
2024-04-26 11:06:40 +02:00
parent e7c0c5f217
commit 0734dc2fac
15 changed files with 524 additions and 89 deletions

View File

@ -40,7 +40,7 @@ impl Motor {
pub const TORQUE_CONSTANT: f64 = 1.0;
/// Creates a motor with the specified initial position.
fn new(position: u16) -> Self {
pub fn new(position: u16) -> Self {
Self {
position: Default::default(),
pos: position % Self::STEPS_PER_REV,
@ -176,6 +176,7 @@ impl Driver {
impl Model for Driver {}
#[allow(dead_code)]
fn main() {
// ---------------
// Bench assembly.