add response for protocol status
This commit is contained in:
parent
4a230a08c2
commit
232fe6b6e2
3 changed files with 41 additions and 0 deletions
|
|
@ -106,6 +106,23 @@ To set a pixel using RGB, use ({SET_PX_RGB_BIN:02X}) (u8 canvas) (x as u16_le) (
|
|||
);
|
||||
writer.write_all(help_text.as_bytes()).await
|
||||
}
|
||||
Response::Protocols(protos) => {
|
||||
for protocol in protos {
|
||||
match protocol {
|
||||
crate::ProtocolStatus::Enabled(proto) => {
|
||||
writer
|
||||
.write_all(format!("Enabled: {}\n", proto).as_bytes())
|
||||
.await?;
|
||||
}
|
||||
crate::ProtocolStatus::Disabled(proto) => {
|
||||
writer
|
||||
.write_all(format!("Disabled: {}\n", proto).as_bytes())
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Response::Size(x, y) => {
|
||||
writer.write_u16(x).await?;
|
||||
writer.write_u16(y).await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue