KodlabPenn / kodlab_mjbots_sdk

Repo for kodlab SDK for use with mjbots ecosystem
Other
8 stars 7 forks source link

CTRL_C_DETECTED Scope #51

Closed ethanmusser closed 1 year ago

ethanmusser commented 2 years ago

kodlab::CTRL_C_DETECTED is defined as a static, gobal variable in common_header.h. As such, it is restircted to the scope of the file in wihch it is defined (i.e., it is not available externally to other translation units), and cannot be used in cpp files other than that where then main method is defined. I am sure access to this variable should not be restricted to header files.

Expected Behavior

kodlab::CTRL_C_DETECTED is accessible globally in all source cpp files.

Current Behavior

kodlab::CTRL_C_DETECTED is only available in the same translation unit as the main method (i.e., not in any other source cpp files).

Proposed Solutions

jdcaporale commented 1 year ago

Fixed by #87