mirror of
https://github.com/italicsjenga/mppt-modbus.git
synced 2024-12-23 16:51:30 +11:00
rearrange mod/use
This commit is contained in:
parent
c458bbc375
commit
41a607c8c2
18
src/main.rs
18
src/main.rs
|
@ -1,18 +1,14 @@
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use std::{fmt::Debug, path::Path, process::Command, sync::Mutex};
|
mod datatypes;
|
||||||
|
mod mppt_structs;
|
||||||
|
mod offsets;
|
||||||
|
use crate::datatypes::*;
|
||||||
|
use crate::mppt_structs::{MpptEeprom, MpptRam};
|
||||||
|
use crate::offsets::{OffsetsEeprom, OffsetsRam};
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use libmodbus_rs::{Modbus, ModbusClient, ModbusRTU};
|
use libmodbus_rs::{Modbus, ModbusClient, ModbusRTU};
|
||||||
|
use std::{fmt::Debug, path::Path, process::Command, sync::Mutex};
|
||||||
mod offsets;
|
|
||||||
use crate::offsets::{OffsetsEeprom, OffsetsRam};
|
|
||||||
|
|
||||||
mod datatypes;
|
|
||||||
use crate::datatypes::*;
|
|
||||||
|
|
||||||
mod mppt_structs;
|
|
||||||
use crate::mppt_structs::{MpptEeprom, MpptRam};
|
|
||||||
|
|
||||||
const DEVICE_ID: u8 = 0x01;
|
const DEVICE_ID: u8 = 0x01;
|
||||||
const RAM_DATA_SIZE: u16 = 0x005B;
|
const RAM_DATA_SIZE: u16 = 0x005B;
|
||||||
|
|
Loading…
Reference in a new issue