提交 a23fc2f4 authored 作者: Serhij S's avatar Serhij S

setup_panic by default, short flash args

上级 beec0638
[package]
name = "roboplc-cli"
version = "0.1.13"
version = "0.1.14"
edition = "2021"
authors = ["Serhij S. <div@altertech.com>"]
license = "Apache-2.0"
......
......@@ -53,8 +53,12 @@ pub struct FlashCommand {
pub cargo_args: Option<String>,
#[clap(long, help = "Do not compile a Rust project, use a file instead")]
pub file: Option<PathBuf>,
#[clap(long, help = "Force flash (automatically put remote in CONFIG mode)")]
#[clap(
short = 'f',
long,
help = "Force flash (automatically put remote in CONFIG mode)"
)]
pub force: bool,
#[clap(long, help = "Put remote in RUN mode after flashing")]
#[clap(short = 'r', long, help = "Put remote in RUN mode after flashing")]
pub run: bool,
}
......@@ -19,10 +19,11 @@ impl Worker<Message, Variables> for Worker1 {
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
roboplc::setup_panic();
roboplc::configure_logger(roboplc::LevelFilter::Info);
if !roboplc::is_production() {
roboplc::thread_rt::set_simulated();
}
roboplc::configure_logger(roboplc::LevelFilter::Info);
roboplc::thread_rt::prealloc_heap(10_000_000)?;
// METRICS
let mut controller = Controller::<Message, Variables>::new();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论