Commit e5e39b54 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼 Committed by Léo-Paul Géneau

Put droneVariableArray in header file

parent f0906899
#ifndef __DRONEDGE_H__
#define __DRONEDGE_H__
#include <open62541/server.h>
#include "pubsub.h"
UA_Float defaultFloat = 0;
UA_Double defaultDouble = 0;
const VariableData droneVariableArray[] = {
{
.name = "latitude",
.description = "Latitude",
.pdefaultValue = &defaultDouble,
.type = UA_TYPES_DOUBLE,
.builtInType = UA_NS0ID_DOUBLE,
},
{
.name = "longitude",
.description = "Longitude",
.pdefaultValue = &defaultDouble,
.type = UA_TYPES_DOUBLE,
.builtInType = UA_NS0ID_DOUBLE,
},
{
.name = "altitude_abs",
.description = "Absolute Altitude (AMSL)",
.pdefaultValue = &defaultFloat,
.type = UA_TYPES_FLOAT,
.builtInType = UA_NS0ID_FLOAT,
},
{
.name = "altitude_rel",
.description = "Relative Altitude",
.pdefaultValue = &defaultFloat,
.type = UA_TYPES_FLOAT,
.builtInType = UA_NS0ID_FLOAT,
},
};
#endif /* __DRONEDGE_H__ */
#include <quickjs/quickjs.h>
#include "mavsdk_wrapper.h"
#include "pubsub.h"
#include "dronedge.h"
static JSClassID js_drone_class_id;
UA_Float defaultFloat = 0;
UA_Double defaultDouble = 0;
const VariableData droneVariableArray[] = {
{
.name = "latitude",
.description = "Latitude",
.pdefaultValue = &defaultDouble,
.type = UA_TYPES_DOUBLE,
.builtInType = UA_NS0ID_DOUBLE,
},
{
.name = "longitude",
.description = "Longitude",
.pdefaultValue = &defaultDouble,
.type = UA_TYPES_DOUBLE,
.builtInType = UA_NS0ID_DOUBLE,
},
{
.name = "altitude_abs",
.description = "Absolute Altitude (AMSL)",
.pdefaultValue = &defaultFloat,
.type = UA_TYPES_FLOAT,
.builtInType = UA_NS0ID_FLOAT,
},
{
.name = "altitude_rel",
.description = "Relative Altitude",
.pdefaultValue = &defaultFloat,
.type = UA_TYPES_FLOAT,
.builtInType = UA_NS0ID_FLOAT,
},
};
static UA_Boolean pubsub_running = true;
int nbDrone;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment