10 #include <argos3/core/wrappers/lua/lua_utility.h>
18 static CRadians SPACING = CRadians(
ARGOS_PI / 12.0f);
19 static CRadians START_ANGLE = SPACING * 0.5f;
26 for(
size_t i = 0; i < 24; ++i) {
43 void CCI_FootBotLightSensor::CreateLuaState(lua_State* pt_lua_state) {
59 void CCI_FootBotLightSensor::ReadingsToLuaState(lua_State* pt_lua_state) {
60 lua_getfield(pt_lua_state, -1,
"light");
62 lua_pushnumber(pt_lua_state, i+1 );
63 lua_gettable (pt_lua_state, -2 );
65 lua_setfield (pt_lua_state, -2,
"value" );
66 lua_pop(pt_lua_state, 1);
68 lua_pop(pt_lua_state, 1);
78 c_os <<
"Value=<" << s_reading.
Value
79 <<
">, Angle=<" << s_reading.
Angle <<
">";
88 if(! t_readings.empty()) {
89 c_os <<
"{ " << t_readings[0].Value <<
" }";
90 for(
UInt32 i = 1; i < t_readings.size(); ++i) {
91 c_os <<
" { " << t_readings[0].Value <<
" }";