Repository navigation
add(rules): eol-resistor-calculator for security alarm panels #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| --- | ||
| description: "Calculates and validates end-of-line (EOL, DEOL, TEOL) resistor loops for security alarm panels." | ||
| globs: **/*.c, **/*.h, **/*.cpp, **/*.hpp, **/security*.*, **/alarm*.* | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # EOL Resistor Calculator Rules | ||
|
|
||
| You are an Autonomous Hardware & Security Systems Specialist. When designing or validating alarm zone loops, strictly enforce these rules: | ||
|
|
||
| ## 1. Loop Supervision Topologies | ||
| - **Single EOL (SEOL):** Detects Normal and Alarm states; cannot differentiate tamper open from wire cut. | ||
| - **Double EOL (DEOL):** Differentiates Normal ({eq} = R_{eol}$), Alarm ({eq} = R_{eol} + R_{alarm}$), Tamper Open ({eq} = \infty$), and Tamper Short ({eq} \approx 0\ \Omega$). | ||
| - **Triple EOL (TEOL):** Adds Anti-Masking parallel resistor state. | ||
|
Comment on lines
+12
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift Require a panel-specific topology before applying the resistor states.
🤖 Prompt for AI Agents |
||
|
|
||
| ## 2. ADC Voltage Threshold Mathematics | ||
| - Voltage divider equation: {zone} = V_{cc} \times \frac{R_{eq}}{R_{eq} + R_{pullup}}$. | ||
| - Ensure minimum noise margin {margin} \ge 0.35V$ between consecutive state windows to prevent false tamper alarms. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: set -eu
printf '%s\n' '--- target file ---'
cat -n rules/eol-resistor-calculator-cursorrules-prompt-file.mdc
printf '%s\n' '--- relevant repository files ---'
git ls-files | rg '(^|/)(README|CONTRIBUTING|AGENTS|CLAUDE|.*(eol|resistor|alarm|panel|cursor|rule).*)' || true
printf '%s\n' '--- relevant references ---'
rg -n -i --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' '0\.35\s*V|noise margin|supported panels|Honeywell Vista|PowerSeries|Texecom|Bosch Security|EOL|end[- ]of[- ]line' . || trueRepository: PatrickJS/awesome-cursorrules Length of output: 16457 Scope the noise-margin requirement to documented hardware. This rule applies to all alarm zone loops, but line 18 hard-codes 🤖 Prompt for AI Agents |
||
| - Account for wire loop resistance ( \times L \times R_{per\_meter}$ for copper AWG 22). | ||
|
|
||
| ## 3. Standard Manufacturer Presets | ||
| - Honeywell Vista: .0\text{ k}\Omega$ EOL. | ||
| - DSC PowerSeries: .6\text{ k}\Omega$ DEOL (.6\text{ k}\Omega / 5.6\text{ k}\Omega$). | ||
| - Texecom Premier: .7\text{ k}\Omega / 2.2\text{ k}\Omega$. | ||
| - Bosch Security: .0\text{ k}\Omega$ DEOL. | ||
|
Comment on lines
+22
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Restore the complete manufacturer preset values.
🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Complete the ADC and wire-resistance equations.
{zone}and{margin}are undefined placeholders, and the$delimiters are unbalanced. The wire-resistance expression has no left-hand variable and does not define whetherLis one-way or total loop length. Define complete equations. For a two-conductor loop, state the factor of two or defineLas total conductor length. The current text does not support reproducible calculations.Also applies to: 17-19
🤖 Prompt for AI Agents