Skip to content

Commit

Permalink
Merge pull request #509 from nicost/U2
Browse files Browse the repository at this point in the history
Utilities: better way to fix conundrum of 3.3 versus 3.30
  • Loading branch information
nicost authored Oct 16, 2024
2 parents 0174e02 + cc60ed9 commit 216ddd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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

0 comments on commit 216ddd7

Please sign in to comment.