#include "command.h" #include #include #include namespace Ion { namespace Device { namespace Bench { namespace Command { void ADC(const char * input) { if (input != nullptr) { reply(sSyntaxError); return; } float result = Ion::Battery::voltage(); constexpr int precision = 8; constexpr int bufferSize = Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(precision); char responseBuffer[bufferSize+4] = {'A', 'D', 'C', '='}; // ADC= Poincare::Complex::convertFloatToText(result, responseBuffer+4, bufferSize, precision); reply(responseBuffer); } } } } }