Don't change state from outside signal. We should just set a requestBPMeasurement flag to TRUE in this function (if current state is IDLE) and then when the state machine runs next, the IDLE state ...
Don't change state from outside signal. We should just set a requestBPMeasurement flag to TRUE in this function (if current state is IDLE) and then when the state machine runs next, the IDLE state should look for this flag to be TRUE and transition to MEASURE state (by doing all of these things you have here in this function).