mirror of
https://github.com/schoebel/mars
synced 2025-01-11 17:19:53 +00:00
light: maintain limiter rates even when switched off
This commit is contained in:
parent
2f4696a9cc
commit
8af22a1785
@ -1408,9 +1408,9 @@ static
|
||||
void _show_rate(struct mars_rotate *rot, struct mars_limiter *limiter, bool running, const char *name)
|
||||
{
|
||||
int rate = limiter->lim_rate;
|
||||
if (!running)
|
||||
rate = 0;
|
||||
__show_actual(rot->parent_path, name, rate);
|
||||
if (!running)
|
||||
mars_limit(limiter, 0);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
@ -3617,14 +3617,11 @@ done:
|
||||
}
|
||||
|
||||
_show_actual(rot->parent_path, "is-replaying", rot->trans_brick && rot->trans_brick->replay_mode && !rot->trans_brick->power.led_off);
|
||||
if (rot->trans_brick)
|
||||
_show_rate(rot, &rot->replay_limiter, rot->trans_brick->power.led_on, "replay_rate");
|
||||
_show_rate(rot, &rot->replay_limiter, rot->trans_brick && rot->trans_brick->power.led_on, "replay_rate");
|
||||
_show_actual(rot->parent_path, "is-copying", rot->fetch_brick && !rot->fetch_brick->power.led_off);
|
||||
if (rot->fetch_brick)
|
||||
_show_rate(rot, &rot->fetch_limiter, rot->fetch_brick->power.led_on, "file_rate");
|
||||
_show_rate(rot, &rot->fetch_limiter, rot->fetch_brick && rot->fetch_brick->power.led_on, "file_rate");
|
||||
_show_actual(rot->parent_path, "is-syncing", rot->sync_brick && !rot->sync_brick->power.led_off);
|
||||
if (rot->sync_brick)
|
||||
_show_rate(rot, &rot->sync_limiter, rot->sync_brick->power.led_on, "sync_rate");
|
||||
_show_rate(rot, &rot->sync_limiter, rot->sync_brick && rot->sync_brick->power.led_on, "sync_rate");
|
||||
err:
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user