MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / razer_get_firmware

Method razer_get_firmware

Controllers/RazerController/RazerController.cpp:948–962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

946\*---------------------------------------------------------------------------------*/
947
948std::string RazerController::razer_get_firmware()
949{
950 std::string firmware_string = "";
951 struct razer_report report = razer_create_report(0x00, RAZER_COMMAND_ID_GET_FIRMWARE_VERSION, 0x02);
952 struct razer_report response_report = razer_create_response();
953
954 std::this_thread::sleep_for(1ms);
955 razer_usb_send(&report);
956 std::this_thread::sleep_for(1ms);
957 razer_usb_receive(&response_report);
958
959 firmware_string = "v" + std::to_string(response_report.arguments[0]) + "." + std::to_string(response_report.arguments[1]);
960
961 return firmware_string;
962}
963
964std::string RazerController::razer_get_serial()
965{

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected