Skip to content

Commit f3d5309

Browse files
committed
Removes monitoring tick rate from Channel-Safely in favor of events
1 parent 4af9010 commit f3d5309

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

plugins/channel-safely/channel-safely-plugin.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ namespace CSP {
143143
pfeature.ival(RISKAVERSE) = config.riskaverse;
144144

145145
psetting.ival(REFRESH_RATE) = config.refresh_freq;
146-
psetting.ival(MONITOR_RATE) = config.monitor_freq;
146+
//psetting.ival(MONITOR_RATE) = config.monitor_freq;
147147
psetting.ival(IGNORE_THRESH) = config.ignore_threshold;
148148
psetting.ival(FALL_THRESH) = config.fall_threshold;
149149
psetting.ival(WATCH_DURATION) = config.res_watch_duration;
@@ -172,7 +172,7 @@ namespace CSP {
172172
config.ignore_threshold = psetting.ival(IGNORE_THRESH);
173173
config.fall_threshold = psetting.ival(FALL_THRESH);
174174
config.refresh_freq = psetting.ival(REFRESH_RATE);
175-
config.monitor_freq = psetting.ival(MONITOR_RATE);
175+
//config.monitor_freq = psetting.ival(MONITOR_RATE);
176176
config.res_watch_duration = psetting.ival(WATCH_DURATION);
177177
} catch (std::exception &e) {
178178
ERR(plugin).print("%s\n", e.what());
@@ -181,6 +181,7 @@ namespace CSP {
181181
}
182182

183183
void UnpauseEvent(bool full_scan = false){
184+
SaveSettings();
184185
DEBUG(plugin).print("UnpauseEvent()\n");
185186
ChannelManager::Get().build_groups(full_scan);
186187
ChannelManager::Get().manage_groups();
@@ -383,8 +384,8 @@ command_result channel_safely(color_ostream &out, std::vector<std::string> &para
383384
}
384385
} else if (parameters[1] == "refresh-freq" && set && parameters.size() == 3) {
385386
config.refresh_freq = std::abs(std::stol(parameters[2]));
386-
} else if (parameters[1] == "monitor-freq" && set && parameters.size() == 3) {
387-
config.monitor_freq = std::abs(std::stol(parameters[2]));
387+
/*} else if (parameters[1] == "monitor-freq" && set && parameters.size() == 3) {
388+
config.monitor_freq = std::abs(std::stol(parameters[2]));*/
388389
} else if (parameters[1] == "watch-duration" && set && parameters.size() == 3) {
389390
config.res_watch_duration = std::abs(std::stol(parameters[2]));
390391
} else if (parameters[1] == "ignore-threshold" && set && parameters.size() == 3) {
@@ -415,7 +416,7 @@ command_result channel_safely(color_ostream &out, std::vector<std::string> &para
415416
out.print(" %-20s\t%s\n", "resurrect: ", config.resurrect ? "on." : "off.");
416417
out.print(" SETTINGS:\n");
417418
out.print(" %-20s\t%" PRIi32 "\n", "refresh-freq: ", config.refresh_freq);
418-
out.print(" %-20s\t%" PRIi32 "\n", "monitor-freq: ", config.monitor_freq);
419+
//out.print(" %-20s\t%" PRIi32 "\n", "monitor-freq: ", config.monitor_freq);
419420
out.print(" %-20s\t%" PRIi32 "\n", "watch-duration: ", config.res_watch_duration);
420421
out.print(" %-20s\t%" PRIu8 "\n", "ignore-threshold: ", config.ignore_threshold);
421422
out.print(" %-20s\t%" PRIu8 "\n", "fall-threshold: ", config.fall_threshold);

plugins/channel-safely/include/plugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct Configuration {
1616
bool insta_dig = false;
1717
bool resurrect = false;
1818
int32_t refresh_freq = 600;
19-
int32_t monitor_freq = 1;
19+
//int32_t monitor_freq = 1;
2020
int32_t res_watch_duration = 1200;
2121
uint8_t ignore_threshold = 5;
2222
uint8_t fall_threshold = 1;

0 commit comments

Comments
 (0)