Commit 6423173e authored by jdelange's avatar jdelange
Browse files

* po-hi-c/src/drivers/po_hi_driver_rasta_serial.c

   - Fix rasta serial driver



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2548 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent e493b86f
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <po_hi_transport.h> #include <po_hi_transport.h>
#include <po_hi_gqueue.h> #include <po_hi_gqueue.h>
#include <po_hi_messages.h> #include <po_hi_messages.h>
#include <po_hi_returns.h>
#include <po_hi_utils.h> #include <po_hi_utils.h>
#include <drivers/po_hi_rtems_utils.h> #include <drivers/po_hi_rtems_utils.h>
#include <drivers/po_hi_driver_rasta_serial.h> #include <drivers/po_hi_driver_rasta_serial.h>
...@@ -171,6 +172,12 @@ int __po_hi_c_driver_serial_rasta_sender (const __po_hi_task_id task_id, const _ ...@@ -171,6 +172,12 @@ int __po_hi_c_driver_serial_rasta_sender (const __po_hi_task_id task_id, const _
request = __po_hi_gqueue_get_most_recent_value (task_id, local_port); request = __po_hi_gqueue_get_most_recent_value (task_id, local_port);
if (request->port == -1)
{
__PO_HI_DEBUG_DEBUG ("[RASTA SERIAL] Send output task %d, port %d (local_port=%d): no value to send\n", task_id, port, local_port);
return __PO_HI_SUCCESS;
}
destination_port = __po_hi_gqueue_get_destination (task_id, local_port, 0); destination_port = __po_hi_gqueue_get_destination (task_id, local_port, 0);
__po_hi_msg_reallocate (&msg); __po_hi_msg_reallocate (&msg);
...@@ -193,6 +200,9 @@ int __po_hi_c_driver_serial_rasta_sender (const __po_hi_task_id task_id, const _ ...@@ -193,6 +200,9 @@ int __po_hi_c_driver_serial_rasta_sender (const __po_hi_task_id task_id, const _
n = write (po_hi_c_driver_rasta_serial_fd, &msg, __PO_HI_MESSAGES_MAX_SIZE); n = write (po_hi_c_driver_rasta_serial_fd, &msg, __PO_HI_MESSAGES_MAX_SIZE);
__PO_HI_DEBUG_DEBUG ("[RASTA SERIAL] write() returns %d\n", n); __PO_HI_DEBUG_DEBUG ("[RASTA SERIAL] write() returns %d\n", n);
request->port = __PO_HI_GQUEUE_INVALID_PORT;
return 1; return 1;
} }
......
Supports Markdown
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