Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilities: better way to fix conundrum of 3.3 versus 3.30 #509

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DeviceAdapters/Utilities/DATTLStateDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,9 @@ int DATTLStateDevice::OnTTLLevel(MM::PropertyBase* pProp, MM::ActionType eAct)
{
if (eAct == MM::BeforeGet)
{

pProp->Set(CDeviceUtils::ConvertToString(ttlVoltage_));
char buffer[8];
snprintf(buffer, sizeof(buffer), "%.1f", ttlVoltage_);
pProp->Set(buffer);
}
else if (eAct == MM::AfterSet)
{
Expand Down
4 changes: 2 additions & 2 deletions DeviceAdapters/Utilities/Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const char* g_normalLogicString = "Normal";
const char* g_invertedLogicString = "Inverted";
const char* g_InvertLogic = "Invert Logic";
const char* g_TTLVoltage = "TTL Voltage";
const char* g_3_3 = "3.30";
const char* g_5_0 = "5.00";
const char* g_3_3 = "3.3";
const char* g_5_0 = "5.0";



Expand Down