Commit 951ec311424ee9132f1714b0ee64bd69d5f3704b

kanoi 2013-06-28T05:58:45

Merge pull request #457 from kanoi/master bflsc get volts stats needs its own GETVOLTS

diff --git a/driver-bflsc.c b/driver-bflsc.c
index 67023f0..0bf2c77 100644
--- a/driver-bflsc.c
+++ b/driver-bflsc.c
@@ -1394,7 +1394,7 @@ static bool bflsc_get_temp(struct cgpu_info *bflsc, int dev)
 
 	err = send_recv_ss(bflsc, dev, &sent, &amount,
 				BFLSC_VOLTAGE, BFLSC_VOLTAGE_LEN, C_REQUESTVOLTS,
-				volt_buf, sizeof(volt_buf)-1, C_GETTEMPERATURE, READ_NL);
+				volt_buf, sizeof(volt_buf)-1, C_GETVOLTS, READ_NL);
 	mutex_unlock(&(bflsc->device_mutex));
 
 	if (!sent) {
diff --git a/usbutils.c b/usbutils.c
index 2f861c9..2d9c141 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -517,6 +517,7 @@ static const char *C_QUEJOBSTATUS_S = "QueJobStatus";
 static const char *C_QUEFLUSH_S = "QueFlush";
 static const char *C_QUEFLUSHREPLY_S = "QueFlushReply";
 static const char *C_REQUESTVOLTS_S = "RequestVolts";
+static const char *C_GETVOLTS_S = "GetVolts";
 static const char *C_SENDTESTWORK_S = "SendTestWork";
 static const char *C_LATENCY_S = "SetLatency";
 static const char *C_SETLINE_S = "SetLine";
@@ -1004,6 +1005,7 @@ static void cgusb_check_init()
 		usb_commands[C_QUEFLUSH] = C_QUEFLUSH_S;
 		usb_commands[C_QUEFLUSHREPLY] = C_QUEFLUSHREPLY_S;
 		usb_commands[C_REQUESTVOLTS] = C_REQUESTVOLTS_S;
+		usb_commands[C_GETVOLTS] = C_GETVOLTS_S;
 		usb_commands[C_SENDTESTWORK] = C_SENDTESTWORK_S;
 		usb_commands[C_LATENCY] = C_LATENCY_S;
 		usb_commands[C_SETLINE] = C_SETLINE_S;
diff --git a/usbutils.h b/usbutils.h
index 151d0a3..9f3c283 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -265,6 +265,7 @@ enum usb_cmds {
 	C_QUEFLUSH,
 	C_QUEFLUSHREPLY,
 	C_REQUESTVOLTS,
+	C_GETVOLTS,
 	C_SENDTESTWORK,
 	C_LATENCY,
 	C_SETLINE,