Skip to content
Snippets Groups Projects
Commit 44a507fc authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

camera_interface: initialize _p_pin & handle error

parent f42a6265
No related branches found
No related tags found
No related merge requests found
#include "camera_interface.h"
#include <px4_log.h>
/**
* @file camera_interface.cpp
......@@ -6,6 +7,7 @@
*/
CameraInterface::CameraInterface():
_p_pin(PARAM_INVALID),
_pins{}
{
}
......@@ -20,6 +22,11 @@ void CameraInterface::get_pins()
// Get parameter handle
_p_pin = param_find("TRIG_PINS");
if (_p_pin == PARAM_INVALID) {
PX4_ERR("param TRIG_PINS not found");
return;
}
int pin_list;
param_get(_p_pin, &pin_list);
......@@ -44,4 +51,4 @@ void CameraInterface::get_pins()
i++;
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment