updated host osal
This commit is contained in:
parent
4177f54f68
commit
853a728d4c
@ -11,13 +11,8 @@
|
||||
#include <mission/core/GenericFactory.h>
|
||||
#include <mission/utility/TmFunnel.h>
|
||||
|
||||
#ifdef LINUX
|
||||
#include <fsfw/osal/linux/TcUnixUdpPollingTask.h>
|
||||
#include <fsfw/osal/linux/TmTcUnixUdpBridge.h>
|
||||
#elif WIN32
|
||||
#include <fsfw/osal/windows/TcWinUdpPollingTask.h>
|
||||
#include <fsfw/osal/windows/TmTcWinUdpBridge.h>
|
||||
#endif
|
||||
#include <fsfw/osal/common/UdpTcPollingTask.h>
|
||||
#include <fsfw/osal/common/UdpTmTcBridge.h>
|
||||
|
||||
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
|
||||
|
||||
@ -45,17 +40,9 @@ void ObjectFactory::produce(){
|
||||
Factory::setStaticFrameworkObjectIds();
|
||||
ObjectFactory::produceGenericObjects();
|
||||
|
||||
#ifdef LINUX
|
||||
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
|
||||
new UdpTmTcBridge(objects::UDP_BRIDGE,
|
||||
objects::CCSDS_PACKET_DISTRIBUTOR,
|
||||
objects::TM_STORE, objects::TC_STORE);
|
||||
new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
|
||||
#elif WIN32
|
||||
new TmTcWinUdpBridge(objects::UDP_BRIDGE,
|
||||
objects::CCSDS_PACKET_DISTRIBUTOR, objects::TM_STORE,
|
||||
objects::TC_STORE);
|
||||
new TcWinUdpPollingTask(objects::UDP_POLLING_TASK,
|
||||
objects::UDP_BRIDGE);
|
||||
#endif
|
||||
new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
|
||||
|
||||
}
|
||||
|
@ -66,6 +66,14 @@ gps_rx_data[] = ""
|
||||
"$GPRMC,183731,A,3907.482,N,12102.436,W,000.0,360.0,080301,015.5,E*67\r\n"
|
||||
"$GPRMB,A,,,,,,,,,,,,V*71\r\n";
|
||||
|
||||
const char hyperion_gps_data[] = ""
|
||||
"$GNGGA,173225.998892,4908.5596,N,00906.2765,E,1,05,2.1,215.0,M,48.2,M,,0000*74\r\n"
|
||||
"$GNGLL,4908.5596,N,00906.2765,E,173225.998892,A,A*7F\r\n"
|
||||
"$GPGSA,A,3,18,16,26,31,20,,,,,,,,3.2,2.1,2.4*3C\r\n"
|
||||
"$GNRMC,173225.998892,A,4908.5596,N,00906.2765,E,000.0,040.7,270221,,,A*4F\r\n"
|
||||
"$GNVTG,040.7,T,,M,000.0,N,000.0,K,A*10\r\n"
|
||||
"$GNZDA,173225.998892,27,02,2021,00,00*75\r\n";
|
||||
|
||||
ReturnValue_t TestTask::performOneShotAction() {
|
||||
#if OBSW_ADD_TEST_CODE == 1
|
||||
//performLwgpsTest();
|
||||
@ -93,18 +101,18 @@ ReturnValue_t TestTask::performActionB() {
|
||||
|
||||
void TestTask::performLwgpsTest() {
|
||||
/* Everything here will only be performed once. */
|
||||
etl::vector<uint8_t, 30> testVec;
|
||||
sif::info << "Processing sample GPS output.." << std::endl;
|
||||
|
||||
lwgps_t gpsStruct;
|
||||
sif::info << "Size of GPS struct: " << sizeof(gpsStruct) << std::endl;
|
||||
lwgps_init(&gpsStruct);
|
||||
|
||||
/* Process all input data */
|
||||
lwgps_process(&gpsStruct, gps_rx_data, strlen(gps_rx_data));
|
||||
lwgps_process(&gpsStruct, hyperion_gps_data, strlen(hyperion_gps_data));
|
||||
|
||||
/* Print messages */
|
||||
printf("Valid status: %d\r\n", gpsStruct.is_valid);
|
||||
printf("Latitude: %f degrees\r\n", gpsStruct.latitude);
|
||||
printf("Longitude: %f degrees\r\n", gpsStruct.longitude);
|
||||
printf("Altitude: %f meters\r\n", gpsStruct.altitude);
|
||||
printf("Valid status: %d\n", gpsStruct.is_valid);
|
||||
printf("Latitude: %f degrees\n", gpsStruct.latitude);
|
||||
printf("Longitude: %f degrees\n", gpsStruct.longitude);
|
||||
printf("Altitude: %f meters\n", gpsStruct.altitude);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user