In the current code with the switch function, a default is missing, which causes the following issue
..Arduino\libraries\SharpIR\src\SharpIR.cpp: In member function 'uint8_t SharpIR::getDistance(bool)':
..Arduino\libraries\SharpIR\src\SharpIR.cpp:41:2: error: control reaches end of non-void function [-Werror=return-type]
41 | }
| ^
cc1plus.exe: some warnings being treated as errors
In the current code with the switch function, a default is missing, which causes the following issue