Skip to main content
Visitor II
April 19, 2020
Solved

CubeMonitor doesn't understand 'bool' types

  • April 19, 2020
  • 2 replies
  • 13773 views

Trying to monitor a 'C' variable of type bool results in the error

not connected ! bad parameter (7)

and the probe connection drops. It then comes back all on its own!!

Changing the variable to any other type and the monitor runs fine.

    This topic has been closed for replies.
    Best answer by Richard.Chvr

    No update since a while, closing the post.

    2 replies

    Visitor II
    April 20, 2020

    Dear frackers,

    Did you define your own bool type or did you use

    #include <stdbool.h>

    ?

    Visitor II
    May 5, 2020

    I have the same issue, all bool values appear as undefined type. I'm including <stdbool.h>.

    CubeMonitor does not seem to convert GCC's _Bool to uint8_t.

    Visitor II
    May 5, 2020

    Dear NPaqu.1,

    Sorry for the inconvenience, but unfortunately the bool type from <stdbool.h> is not supported for the time being. This is definitively something we will consider in an upcoming release.

    Meanwhile, you can define your own bool type like this :

    typedef enum { false, true } bool;

    or even like this :

    typedef int bool;
    #define true 1
    #define false 0

    Technical Moderator
    September 27, 2023

    No update since a while, closing the post.