Skip to content
This repository was archived by the owner on Jun 24, 2023. It is now read-only.
This repository was archived by the owner on Jun 24, 2023. It is now read-only.

Code improvements #3

@Spottedleaf

Description

@Spottedleaf
  • Replace the janky queue implementations in input handler and logger with rl_cdrain_queue
  • Ensure memory allocated is valid (non-NULL)
  • Redesign logging functions
  • With cdrain_queue, change the input handler to use a polling method like logger (would also fix losing input for distance travelled)
  • General code cleanup (variable names, error handling, look at splitting utils.h into utils.h and accel.h)

Redesign console handling:

  • Add functions for printing without format
  • Split lines by \n and print them separately (allocate y-indices beforehand)
  • Add explicit character limit (2048)
  • Add function for clearing an entire y-position
  • Add functions which print and clear atomically

Redesign main loop:

  • Bulk read inputs

Atomic value handling:

  • Create bridge class and header to avoid using C++ for fixed width atomic integer types
    Variables defined to be using this bridge must include the prefix atomic_

Configurations (rl_config):

-Detailed errors
-General cleanup

Misc:

  • Fix negative pre-scale values potentially creating accel values of nan
  • Fix bug where logfiles cannot be read while the program is running

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions