Tuesday, February 10, 2009

control loop running on summit, 1 seg

The control loop is running on the summit for the first time. Since only one segment is active, this is a trivial configuration: there are no active sensors, the control calculations don't make any sense, etc. But, the software is running and is being driven by DLP arrival.

  • Since there is no sensor feedback, there is no indication that the loop is running other than that the scheduler state is cycling. Must log some kinda periodic health info.

  • There is no direct, positive indication that DLPs are intact, only indications on error. Should periodically log DLPs in hex.

Message queue full error

IOP task was getting a message queue full error when posting the scheduler task. This is probably due to either 1. startup seqeuence error where IOP posts SCH before SCH can consume messages, or 2. message queue is not getting cleared at startup.

Temporarily clear queue and post anyhow. task.c:404

connect() returns EBADF when run in thread

At least temporarily resolved EBADF error on socket connect by setting socket to non-blocking mode after connect.  This means that real socket-connect failures may block.  

Another possibility is to ignore the EBADF return from connect and come back and check socket connect status after a short delay, similar to EINPROGRESS handling.

Note that this error does not occur when connect is run in a non-threaded program (tst conn), only when connect is called from within a thread (tst tconn).


Thursday, February 5, 2009

Writing new up32mult used in the filter calculation. Originally written in assembly, source lost. Designed for fast multiplication on IV-1624 which had no floating-point coprocessor.

Replaced with FP multiply, convert to int, return upper 32-bits of result.

May have to revisit for performance, but probably not.