Browse Source

knc: Expose Voltage and DCDC Current to TUI Manage device

Luke Dashjr 12 years ago
parent
commit
010ce4234a
1 changed files with 15 additions and 0 deletions
  1. 15 0
      driver-knc.c

+ 15 - 0
driver-knc.c

@@ -691,6 +691,18 @@ struct api_data *knc_api_extra_device_status(struct cgpu_info * const cgpu)
 	return root;
 	return root;
 }
 }
 
 
+#ifdef HAVE_CURSES
+static
+void knc_wlogprint_status(struct cgpu_info * const cgpu)
+{
+	struct thr_info * const thr = cgpu->thr[0];
+	struct knc_core * const knccore = thr->cgpu_data;
+	
+	wlogprint("Voltage: %.3f  DCDC Current: %.3f\n",
+	          knccore->volt, knccore->current);
+}
+#endif
+
 struct device_drv knc_drv = {
 struct device_drv knc_drv = {
 	.dname = "knc",
 	.dname = "knc",
 	.name = "KNC",
 	.name = "KNC",
@@ -707,4 +719,7 @@ struct device_drv knc_drv = {
 	
 	
 	.get_stats = knc_get_stats,
 	.get_stats = knc_get_stats,
 	.get_api_extra_device_status = knc_api_extra_device_status,
 	.get_api_extra_device_status = knc_api_extra_device_status,
+#ifdef HAVE_CURSES
+	.proc_wlogprint_status = knc_wlogprint_status,
+#endif
 };
 };