RestService.cpp
/**
 * Initialize IR LED controller REST service. Note that WIFI must be enabled
 * before calling this function.
 */
Initialize IR LED controller REST service. Note that WIFI must be enabled
before calling this function.
Initialize IR LED controller REST service . Note that WIFI must be enabled before calling this function .
void rs_init(void){
  state.raw = "unknown";
  state.brightness = "unknown";
  state.power = "unknown";
  state.function = "unknown";
  state.color = "unknown";
  state.uri = "unknown";
  server.on("/",HTTP_GET,_handle_root);
  server.on("/routes",HTTP_GET,_handle_root);
  server.on("/cached-state",HTTP_GET,_handle_cached_state);
  server.on("/raw",_handle_raw);
  server.on("/brightness",_handle_brightness);
  server.on("/power",_handle_power);
  server.on("/function",_handle_functions);
  server.on("/color",_handle_colors);
  server.onNotFound(_handle_not_found);
  server.begin();
}
void rs_init ( void ) { state . raw = " " ; state . brightness = " " ; state . power = " " ; state . function = " " ; state . color = " " ; state . uri = " " ; server . on ( " " , HTTP_GET , _handle_root ) ; server . on ( " " , HTTP_GET , _handle_root ) ; server . on ( " " , HTTP_GET , _handle_cached_state ) ; server . on ( " " , _handle_raw ) ; server . on ( " " , _handle_brightness ) ; server . on ( " " , _handle_power ) ; server . on ( " " , _handle_functions ) ; server . on ( " " , _handle_colors ) ; server . onNotFound ( _handle_not_found ) ; server . begin ( ) ; }
Initialize IR LED controller REST service.
Initialize IR LED controller REST service .