예제 #1
0
int32_t writeParametersToStorage()
{
	//					// WORKING
	//					ObjectPersistenceData objper;
	//
	//					// Write all objects individually
	//					// for;;
	//					ObjectPersistenceGet(&objper);
	//
	//					ActuatorSettingsData settings;
	//					ActuatorSettingsGet(&settings);
	//
	//					objper.Selection = OBJECTPERSISTENCE_SELECTION_SINGLEOBJECT;
	//					objper.Operation = OBJECTPERSISTENCE_OPERATION_SAVE;
	//					objper.ObjectID = ACTUATORSETTINGS_OBJID;
	//					objper.InstanceID = 0;
	//					ObjectPersistenceSet(&objper);
	//					// END WORKING



	UAVObjHandle handle = ActuatorSettingsHandle();
	return UAVObjSave(handle, 0);
}
예제 #2
0
void ActuatorSettingsMotorsSpinWhileArmedGet( uint8_t *NewMotorsSpinWhileArmed )
{
	UAVObjGetDataField(ActuatorSettingsHandle(), (void*)NewMotorsSpinWhileArmed, offsetof( ActuatorSettingsData, MotorsSpinWhileArmed), sizeof(uint8_t));
}
예제 #3
0
void ActuatorSettingsChannelAddrGet( uint8_t *NewChannelAddr )
{
	UAVObjGetDataField(ActuatorSettingsHandle(), (void*)NewChannelAddr, offsetof( ActuatorSettingsData, ChannelAddr), 10*sizeof(uint8_t));
}
예제 #4
0
void ActuatorSettingsChannelTypeSet( uint8_t *NewChannelType )
{
	UAVObjSetDataField(ActuatorSettingsHandle(), (void*)NewChannelType, offsetof( ActuatorSettingsData, ChannelType), 10*sizeof(uint8_t));
}
예제 #5
0
void ActuatorSettingsChannelMinGet( int16_t *NewChannelMin )
{
	UAVObjGetDataField(ActuatorSettingsHandle(), (void*)NewChannelMin, offsetof( ActuatorSettingsData, ChannelMin), 10*sizeof(int16_t));
}
예제 #6
0
void ActuatorSettingsChannelNeutralSet( int16_t *NewChannelNeutral )
{
	UAVObjSetDataField(ActuatorSettingsHandle(), (void*)NewChannelNeutral, offsetof( ActuatorSettingsData, ChannelNeutral), 10*sizeof(int16_t));
}
예제 #7
0
void ActuatorSettingsChannelUpdateFreqGet( uint16_t *NewChannelUpdateFreq )
{
	UAVObjGetDataField(ActuatorSettingsHandle(), (void*)NewChannelUpdateFreq, offsetof( ActuatorSettingsData, ChannelUpdateFreq), 6*sizeof(uint16_t));
}
예제 #8
0
int32_t readParametersFromStorage()
{
	UAVObjHandle handle = ActuatorSettingsHandle();
	return UAVObjLoad(handle, 0);
}