Browse Source

RPC: Add "Rotate Period" to config

Luke Dashjr 10 years ago
parent
commit
212bb40a81
2 changed files with 4 additions and 0 deletions
  1. 2 0
      README.RPC
  2. 2 0
      api.c

+ 2 - 0
README.RPC

@@ -156,6 +156,7 @@ The list of requests - a (*) means it requires privileged access - and replies:
                               ADL=X, <- Y or N if ADL is compiled in the code
                               ADL in use=X, <- Y or N if any GPU has ADL
                               Strategy=Name, <- the current pool strategy
+                              Rotate Period=N, <- rotate strategy period
                               Log Interval=N, <- log interval (--log N)
                               Device Code=GPU ICA , <- spaced list of compiled
                                                        device drivers
@@ -456,6 +457,7 @@ Feature Changelog for external applications using the API:
 API V3.4 (BFGMiner v5.4.0)
 
 Modified API commands:
+ 'config' - add 'Rotate Period'
  'setconfig' - add 'strategy'
 
 ---------

+ 2 - 0
api.c

@@ -1315,6 +1315,8 @@ static void minerconfig(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __
 	root = api_add_const(root, "ADL", (char *)adl, false);
 	root = api_add_string(root, "ADL in use", adlinuse, false);
 	root = api_add_const(root, "Strategy", strategies[pool_strategy].s, false);
+	if (pool_strategy == POOL_ROTATE)
+		root = api_add_int(root, "Rotate Period", &opt_rotate_period, false);
 	root = api_add_int(root, "Log Interval", &opt_log_interval, false);
 	
 	strcpy(buf, ""