@@ -82,6 +82,11 @@ namespace ml {
8282 ) ;
8383 }
8484
85+ /**
86+ * Do something when an ML event is no longer detected.
87+ * @param event one of the actions the machine learning model was trained on
88+ * @param body code to execute
89+ */
8590 //% blockId=ml_on_event_stop
8691 //% block="on ML $event stop"
8792 //% weight=40
@@ -95,6 +100,11 @@ namespace ml {
95100 event . onStopHandler = body ;
96101 }
97102
103+ /**
104+ * Do something when an ML event is no longer detected.
105+ * @param event one of the actions the machine learning model was trained on
106+ * @param body code to execute
107+ */
98108 //% blockId=ml_on_event_stop_detailed
99109 //% block="on ML $event stop $duration (ms)"
100110 //% weight=30
@@ -112,6 +122,10 @@ namespace ml {
112122 event . onStopDetailedHandler = body ;
113123 }
114124
125+ /**
126+ * Tests if an ML event is currently detected.
127+ * @param event one of the actions the machine learning model was trained on
128+ */
115129 //% blockId=ml_is_event_detected
116130 //% block="is ML $event detected"
117131 //% weight=20
@@ -126,6 +140,10 @@ namespace ml {
126140 return event . eventValue == currentEventId ( ) ;
127141 }
128142
143+ /**
144+ * Get the certainty of an ML event in percent.
145+ * @param event one of the actions the machine learning model was trained on
146+ */
129147 //% blockId=ml_on_event_certainty
130148 //% block="certainty (\\%) ML $event"
131149 //% weight=10
0 commit comments