MCPcopy Create free account
hub / github.com/PowerBroker2/DFPlayerMini_Fast / printError

Method printError

src/DFPlayerMini_Fast.cpp:1213–1274  ·  view source on GitHub ↗

/ ! @brief Print the error description if an error has been received */ /

Source from the content-addressed store, hash-verified

1211 */
1212 /**************************************************************************/
1213void DFPlayerMini_Fast::printError()
1214{
1215 if (recStack.commandValue == 0x40)
1216 {
1217 switch (recStack.paramLSB)
1218 {
1219 case 0x1:
1220 {
1221 Serial.println("Module busy (this info is returned when the initialization is not done)");
1222 break;
1223 }
1224 case 0x2:
1225 {
1226 Serial.println("Currently sleep mode(supports only specified device in sleep mode)");
1227 break;
1228 }
1229 case 0x3:
1230 {
1231 Serial.println("Serial receiving error(a frame has not been received completely yet)");
1232 break;
1233 }
1234 case 0x4:
1235 {
1236 Serial.println("Checksum incorrect");
1237 break;
1238 }
1239 case 0x5:
1240 {
1241 Serial.println("Specified track is out of current track scope");
1242 break;
1243 }
1244 case 0x6:
1245 {
1246 Serial.println("Specified track is not found");
1247 break;
1248 }
1249 case 0x7:
1250 {
1251 Serial.println("Insertion error(an inserting operation only can be done when a track is being played)");
1252 break;
1253 }
1254 case 0x8:
1255 {
1256 Serial.println("SD card reading failed(SD card pulled out or damaged)");
1257 break;
1258 }
1259 case 0xA:
1260 {
1261 Serial.println("Entered into sleep mode");
1262 break;
1263 }
1264 default:
1265 {
1266 Serial.print("Unknown error: ");
1267 Serial.println(recStack.paramLSB);
1268 break;
1269 }
1270 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected