 			break;
 		}
 
-		case PUBLISH_SERVO_EVENT:{
+		case SERVO_EVENTS_ENABLE:{
 			servo_type& s = servos[ioCmd[1]];
 			s.eventsEnabled = ioCmd[2];
 			break;

				} else if (sensor.state == ECHO_STATE_GOOD_RANGE || sensor.state == ECHO_STATE_TIMEOUT) {
					Serial.write(MAGIC_NUMBER);
					Serial.write(6); // size 1 FN + 4 bytes of unsigned long
					Serial.write(PUBLISH_SESOR_DATA);
					Serial.write(i);
		            // write the long value out
					Serial.write((byte)(sensor.lastValue >> 24));


	Serial.write(MAGIC_NUMBER);
	Serial.write(5); // size = 1 FN + 1 INDEX + 1 eventType + 1 curPos
	Serial.write(SERVO_EVENT);
	Serial.write(s.index); // send my index
	// write the long value out
	Serial.write(eventType);
