Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit f1568c0

Browse files
committed
#76 #93 Added Delay and DelayOnSuccess. Refactored the camera GET method to make it more maintainable.
1 parent 302fb6d commit f1568c0

File tree

3 files changed

+173
-79
lines changed

3 files changed

+173
-79
lines changed

SynoAI/Config.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static class Config
123123
/// <summary>
124124
/// The period of time in milliseconds (ms) that must occur between the last successful motion detection of camera and the next time it'll be processed.
125125
/// </summary>
126-
public static int DelayAfterSuccess { get; private set; }
126+
public static int? DelayAfterSuccess { get; private set; }
127127

128128
/// <summary>
129129
/// The default minimum width that an object must be to be considered valid for reporting. Can be overridden on a camera by camera basis to account for different camera resolutions.
@@ -202,6 +202,9 @@ public static void Generate(ILogger logger, IConfiguration configuration)
202202
MinSizeX = configuration.GetValue<int>("MinSizeX", 50);
203203
MinSizeY = configuration.GetValue<int>("MinSizeY", 50);
204204

205+
Delay = configuration.GetValue<int>("Delay", 0);
206+
DelayAfterSuccess = configuration.GetValue<int>("DelayAfterSuccess", 0);
207+
205208
// euquiq: A bit overkill to use int.MaxValue :)
206209
// TODO: Just make this use 0 or null and handle appropriately
207210
MaxSizeX = configuration.GetValue<int>("MaxSizeX", int.MaxValue);

0 commit comments

Comments
 (0)