Specific usage of the getStatus method? #161
Answered
by
Makuna
caibimiaokong
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
Makuna
Feb 11, 2024
Replies: 1 comment 1 reply
-
(moved to discussions where questions are asked and answered) The Wiki Entry for the getStatus method Using the form of Why did you think you needed the single quotes around DfMp3_StatusState_Paused? DfMp3_Status.state is an enum. Search for how c++ enums are used.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Makuna
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(moved to discussions where questions are asked and answered)
The Wiki Entry for the getStatus method
Using the form of
mp3.getStatus().state
is not a good idea in any code. Every time you call getStatus() it communicates to the chip in this case, in other similar uses it could be far worse. Don't assume these calls are cheap. Call it once and store the results then use the results.Why did you think you needed the single quotes around DfMp3_StatusState_Paused? DfMp3_Status.state is an enum. Search for how c++ enums are used.