Menu

#4 Refactoring: buffered console output

ToDo
closed
mpro
None
2013-12-03
2013-10-24
Andrey B
No

We need to package buffered output currently implemented in datalogging as ChibiOS/RT stream so that printf could be used code could be simplified.

Discussion

  • Andrey B

    Andrey B - 2013-11-07
    • assigned_to: Andrey B --> nobody
     
  • Andrey B

    Andrey B - 2013-11-21

    This is about

        resetLogging(&signal->logging);
        append(&signal->logging, "msg");
        append(&signal->logging, DELIMETER);
                appendInt(&signal->logging, now - signal->last_scheduling_time);
        append(&signal->logging, " ticks ago ");
        scheduleLogging(&signal->logging);
    

    Which we need because we are not allowed to print directly to console in interupt handler context.

    The first step of improving this nightmare would be
    printbuffered(&signal->logging, "msg;%d ticks ago", now - signal->last_scheduling_time);

    Later we might consider changing the primary 'print' implementation so that it checks current context dynamically and uses the same shared buffer for output (see isIsrContext()), but that's a separate story.

     
  • Andrey B

    Andrey B - 2013-11-22
    • assigned_to: mpro
     
  • Andrey B

    Andrey B - 2013-12-03
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB