Speed up AT commands
This commit is contained in:
parent
a9df3bed8c
commit
db6270d262
@ -37,10 +37,8 @@ impl<'a, 'd> ATCommands<'a, 'd> {
|
||||
}
|
||||
|
||||
pub fn raw_command(&mut self, command: String) -> String {
|
||||
self.flush_rx();
|
||||
|
||||
self.uart.flush().unwrap();
|
||||
self.delay.delay_millis(250);
|
||||
self.flush_rx();
|
||||
self.uart.write_str(&(command.clone() + "\r")).unwrap();
|
||||
self.uart.flush().unwrap();
|
||||
self.delay.delay_millis(500);
|
||||
@ -49,10 +47,8 @@ impl<'a, 'd> ATCommands<'a, 'd> {
|
||||
}
|
||||
|
||||
pub fn raw_two_part_command(&mut self, command: String, additional: String) -> String {
|
||||
self.flush_rx();
|
||||
|
||||
self.uart.flush().unwrap();
|
||||
self.delay.delay_millis(250);
|
||||
self.flush_rx();
|
||||
self.uart.write_str(&(command.clone() + "\r")).unwrap();
|
||||
self.uart.flush().unwrap();
|
||||
self.delay.delay_millis(500);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user