src/Speech.cpp
/// <summary>
/// Event called when a valid json message was received. 
/// Consumes the proper values for this sensor.
/// </summary>
/// <param name="root">The root json object.</param>
/// <param name="shieldEvent">The shield event.</param>

Event called when a valid json message was received.
Consumes the proper values for this sensor.

The root json object.
The shield event.
Event called when a valid json message was received . Consumes the proper values for this sensor . The root json object . The shield event .
void Speech::onJsonReceived(JsonObject& root, ShieldEvent* shieldEvent) 
{
    if (shieldEvent->resultId < 1 || shieldEvent->resultId > 3) {
        IsSpeaking = false;
    }
    else if (shieldEvent->resultId > 0 && shieldEvent->resultId < 4) {
        IsSpeaking = true;
    }
	Sensor::onJsonReceived(root, shieldEvent);
}
void Speech :: onJsonReceived ( JsonObject & root , ShieldEvent * shieldEvent ) { if ( shieldEvent -> resultId < 1 || shieldEvent -> resultId > 3 ) { IsSpeaking = false ; } else if ( shieldEvent -> resultId > 0 && shieldEvent -> resultId < 4 ) { IsSpeaking = true ; } Sensor :: onJsonReceived ( root , shieldEvent ) ; }
<summary>
Event called when a valid json message was received.
<summary > Event called when a valid json message was received .