fix help messages in demo commands

This commit is contained in:
bunnie 2026-01-06 15:44:17 +08:00
parent 079ec33134
commit f387e06b15
2 changed files with 4 additions and 3 deletions

View file

@ -17,7 +17,7 @@ impl<'a> ShellCmdApi<'a> for Touch {
fn process(&mut self, args: String, env: &mut super::CommonEnv) -> Result<Option<String>, xous::Error> {
use core::fmt::Write;
let mut ret = String::new();
let helpstring = "ws2812 [rainbow [<duration>]] [length <pixels>] [hexcolor <#rrggbb>]";
let helpstring = "touch [pin] [monitor] [wait-touch] [wait-release] [touch-release]";
let mut tokens = args.split(' ');
@ -34,7 +34,7 @@ impl<'a> ShellCmdApi<'a> for Touch {
let mut captouch = bio_lib::captouch::Captouch::new(self.pin, None).unwrap();
captouch.calibrate(None).unwrap();
loop {
log::info!("{:?}, {}", captouch.is_touched(), captouch.raw_status());
log::info!("{}", captouch.raw_status());
env.ticktimer.sleep_ms(100).ok();
}
}

View file

@ -30,7 +30,8 @@ impl<'a> ShellCmdApi<'a> for Ws2812 {
fn process(&mut self, args: String, env: &mut super::CommonEnv) -> Result<Option<String>, xous::Error> {
use core::fmt::Write;
let mut ret = String::new();
let helpstring = "ws2812 [rainbow [<duration>]] [length <pixels>] [hexcolor <#rrggbb>]";
let helpstring =
"ws2812 [rainbow [<duration>]] [touch [<duration>]] [length <pixels>] [hexcolor <#rrggbb>]";
let mut tokens = args.split(' ');