-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(A3040): Begin A3040 parser work and refactor "toggle" structs
- Loading branch information
Showing
23 changed files
with
110 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use derive_more::From; | ||
|
||
/// | ||
/// "Toggle" types, booleans that represent a toggleable feature and are parsed using the bool_parser. | ||
/// | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct GameMode(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct BassUp(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct LDAC(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct InEarBeep(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct SupportTwoCnn(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct ThreeDimensionalEffect(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct SideTone(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct PowerOnBatteryNotice(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct TwsStatus(pub bool); | ||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct WearDetection(pub bool); | ||
|
||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct TouchTone(pub bool); | ||
|
||
|
||
#[derive( | ||
Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Default, Hash, From, | ||
)] | ||
pub struct AgeRange(pub u8); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use serde::{Serialize, Deserialize}; | ||
|
||
use crate::models::{SingleBattery, FirmwareVer, SerialNumber}; | ||
|
||
|
||
#[derive(Debug, Serialize, Deserialize, Clone, Eq, PartialEq, Hash)] | ||
pub struct A3040StateResponse { | ||
pub battery: SingleBattery, | ||
pub fw: FirmwareVer, | ||
pub sn: SerialNumber, | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.