Read CO2 concentration from mh-z19 sensor on the Raspberry Pi & handle it. Detect Raspberry Pi model automatically and read the value from an appropriate serial device.
Currently the conditions pimodel == "3 Model B" or pimodel == "4 Model B" never are true, as pimodel is assigned the reference to function getrpimodel.model instead of its return value.
I guess it never was an issue, because '/dev/serial0' usually exists and takes precedence on these pi models (?) I only noticed the problem because I forgot to pass access to '/dev/serial0' to a docker container.
Currently the conditions
pimodel == "3 Model B" or pimodel == "4 Model B"
never are true, aspimodel
is assigned the reference to functiongetrpimodel.model
instead of its return value. I guess it never was an issue, because'/dev/serial0'
usually exists and takes precedence on these pi models (?) I only noticed the problem because I forgot to pass access to'/dev/serial0'
to a docker container.