Updated proto with request->response features
This commit is contained in:
@@ -29,6 +29,25 @@ void printFeatureConfiguration() {
|
||||
ESP_LOGI("Features", "==========================================================");
|
||||
}
|
||||
|
||||
void features_request(socket_message_FeaturesDataRequest& fd_req, socket_message_FeaturesDataResponse& fd_res) {
|
||||
fd_res.camera = USE_CAMERA ? true : false;
|
||||
fd_res.imu = (USE_MPU6050 || USE_BNO055) ? true : false;
|
||||
fd_res.mag = (USE_HMC5883 || USE_BNO055) ? true : false;
|
||||
fd_res.bmp = USE_BMP180 ? true : false;
|
||||
//fd_res.sonar = USE_USS ? true : false;
|
||||
fd_res.sonar = fd_req.sonar_test; // Temporarily set to a variable for testing
|
||||
fd_res.servo = USE_PCA9685 ? true : false;
|
||||
fd_res.ws2812 = USE_WS2812 ? true : false;
|
||||
fd_res.mdns = USE_MDNS ? true : false;
|
||||
fd_res.embed_www = EMBED_WEBAPP ? true : false;
|
||||
strcpy(fd_res.firmware_version, APP_VERSION);
|
||||
strcpy(fd_res.firmware_name, APP_NAME);
|
||||
strcpy(fd_res.firmware_built_target, BUILD_TARGET);
|
||||
strcpy(fd_res.variant, KINEMATICS_VARIANT_STR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void features(JsonObject &root) {
|
||||
root["camera"] = USE_CAMERA ? true : false;
|
||||
root["imu"] = (USE_MPU6050 || USE_BNO055) ? true : false;
|
||||
|
||||
Reference in New Issue
Block a user