fix TEC current scale

This commit is contained in:
Sebastien Bourdeauducq 2025-01-21 10:58:43 +08:00
parent d59c904688
commit e4a2093460
2 changed files with 3 additions and 3 deletions

View File

@ -37,10 +37,10 @@ float Kirdy::get_laser_temp()
return reply["thermostat"]["temperature"].asFloat(); return reply["thermostat"]["temperature"].asFloat();
} }
void Kirdy::set_tec_current(float amps) void Kirdy::set_tec_current(float milliamps)
{ {
Json::Value request; Json::Value request;
request["tec_set_i"] = amps; request["tec_set_i"] = milliamps*0.001f;
Json::Value reply = command(request); Json::Value reply = command(request);
if(reply["msg_type"].asString() != "Acknowledge") if(reply["msg_type"].asString() != "Acknowledge")
std::cerr << "TEC set current failed\n"; std::cerr << "TEC set current failed\n";

View File

@ -10,5 +10,5 @@ class Kirdy {
public: public:
Kirdy(asio::string_view host, asio::string_view service); Kirdy(asio::string_view host, asio::string_view service);
float get_laser_temp(); float get_laser_temp();
void set_tec_current(float amps); void set_tec_current(float milliamps);
}; };