@@ -1,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: bin/fsw |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Wed Nov 13 08:18:19 2013 | |
|
4 | 4 | # Project: fsw-qt.pro |
|
5 | 5 | # Template: app |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
@@ -10,7 +10,7 | |||
|
10 | 10 | |
|
11 | 11 | CC = sparc-rtems-gcc |
|
12 | 12 | CXX = sparc-rtems-g++ |
|
13 |
DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=2 |
|
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=22 -DPRINT_MESSAGES_ON_CONSOLE | |
|
14 | 14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | 15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
@@ -7,11 +7,11 CONFIG -= qt | |||
|
7 | 7 | include(./sparc.pri) |
|
8 | 8 | |
|
9 | 9 | # flight software version |
|
10 |
SWVERSION=-0-2 |
|
|
10 | SWVERSION=-0-22 | |
|
11 | 11 | DEFINES += SW_VERSION_N1=0 |
|
12 | 12 | DEFINES += SW_VERSION_N2=0 |
|
13 | 13 | DEFINES += SW_VERSION_N3=0 |
|
14 |
DEFINES += SW_VERSION_N4=2 |
|
|
14 | DEFINES += SW_VERSION_N4=22 | |
|
15 | 15 | |
|
16 | 16 | contains( CONFIG, verbose ) { |
|
17 | 17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 2.8.1, 2013-11-1 |
|
|
3 | <!-- Written by QtCreator 2.8.1, 2013-11-13T08:16:16. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -18,7 +18,7 int send_tm_lfr_tc_exe_not_executable(cc | |||
|
18 | 18 | int send_tm_lfr_tc_exe_not_implemented(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
19 | 19 | int send_tm_lfr_tc_exe_error(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
20 | 20 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
21 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV); | |
|
21 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, unsigned char destinationID); | |
|
22 | 22 | |
|
23 | 23 | void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id ); |
|
24 | 24 |
@@ -117,6 +117,7 rtems_task recv_task( rtems_task_argumen | |||
|
117 | 117 | ccsdsTelecommandPacket_t currentTC; |
|
118 | 118 | unsigned char computed_CRC[ 2 ]; |
|
119 | 119 | unsigned char currentTC_LEN_RCV[ 2 ]; |
|
120 | unsigned char destinationID; | |
|
120 | 121 | unsigned int currentTC_LEN_RCV_AsUnsignedInt; |
|
121 | 122 | unsigned int parserCode; |
|
122 | 123 | rtems_status_code status; |
@@ -165,7 +166,15 rtems_task recv_task( rtems_task_argumen | |||
|
165 | 166 | !( (currentTC.serviceType==TC_TYPE_GEN) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_INFO)) |
|
166 | 167 | ) |
|
167 | 168 | { |
|
168 | send_tm_lfr_tc_exe_corrupted( ¤tTC, queue_send_id, computed_CRC, currentTC_LEN_RCV ); | |
|
169 | if ( parserCode == WRONG_SRC_ID ) | |
|
170 | { | |
|
171 | destinationID = SID_TC_GROUND; | |
|
172 | } | |
|
173 | else | |
|
174 | { | |
|
175 | destinationID = currentTC.sourceID; | |
|
176 | } | |
|
177 | send_tm_lfr_tc_exe_corrupted( ¤tTC, queue_send_id, computed_CRC, currentTC_LEN_RCV, destinationID ); | |
|
169 | 178 | } |
|
170 | 179 | } |
|
171 | 180 | else |
@@ -113,6 +113,7 int tc_parser(ccsdsTelecommandPacket_t * | |||
|
113 | 113 | */ |
|
114 | 114 | |
|
115 | 115 | int status; |
|
116 | int status_crc; | |
|
116 | 117 | unsigned char pid; |
|
117 | 118 | unsigned char category; |
|
118 | 119 | unsigned int length; |
@@ -169,9 +170,10 int tc_parser(ccsdsTelecommandPacket_t * | |||
|
169 | 170 | { |
|
170 | 171 | status = tc_check_length( packetSubtype, length ); |
|
171 | 172 | } |
|
173 | status_crc = tc_check_crc( TCPacket, length, computed_CRC ); | |
|
172 | 174 | if (status == CCSDS_TM_VALID ) // CHECK CRC |
|
173 | 175 | { |
|
174 | status = tc_check_crc( TCPacket, length, computed_CRC ); | |
|
176 | status = status_crc; | |
|
175 | 177 | } |
|
176 | 178 | |
|
177 | 179 | return status; |
@@ -334,7 +334,8 int send_tm_lfr_tc_exe_error( ccsdsTelec | |||
|
334 | 334 | } |
|
335 | 335 | |
|
336 | 336 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
337 |
unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV |
|
|
337 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, | |
|
338 | unsigned char destinationID) | |
|
338 | 339 | { |
|
339 | 340 | /** This function sends a TM_LFR_TC_EXE_CORRUPTED packet in the dedicated RTEMS message queue. |
|
340 | 341 | * |
@@ -376,7 +377,7 int send_tm_lfr_tc_exe_corrupted(ccsdsTe | |||
|
376 | 377 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
377 | 378 | TM.serviceType = TM_TYPE_TC_EXE; |
|
378 | 379 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; |
|
379 |
TM.destinationID = |
|
|
380 | TM.destinationID = destinationID; | |
|
380 | 381 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
381 | 382 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
382 | 383 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
General Comments 0
You need to be logged in to leave comments.
Login now