mirror of
https://github.com/rightup/pyMC_Repeater.git
synced 2026-03-28 17:43:06 +01:00
temp fix for airtime till sync from upstream
This commit is contained in:
14
.github/instructions/snyk_rules.instructions.md
vendored
Normal file
14
.github/instructions/snyk_rules.instructions.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
alwaysApply: true
|
||||
always_on: true
|
||||
trigger: always_on
|
||||
applyTo: "**"
|
||||
description: Snyk Security At Inception
|
||||
---
|
||||
|
||||
# Project security best practices
|
||||
|
||||
- Always run snyk_code_scan tool for new first party code that is generated in a Snyk-supported language.
|
||||
- If any security issues are found based on newly introduced or modified code or dependencies, attempt to fix the issues using the results context from Snyk.
|
||||
- Rescan the code after fixing the issues to ensure that the issues were fixed and that there are no newly introduced issues.
|
||||
- Repeat this process until no new issues are found.
|
||||
@@ -53,14 +53,15 @@ class AirtimeManager:
|
||||
Airtime in milliseconds
|
||||
"""
|
||||
sf = spreading_factor or self.spreading_factor
|
||||
bw_khz = (bandwidth_hz or self.bandwidth) / 1000
|
||||
bw_hz = (bandwidth_hz or self.bandwidth)
|
||||
bw_khz = bw_hz / 1000
|
||||
cr = coding_rate or self.coding_rate
|
||||
preamble_len = preamble_len or self.preamble_length
|
||||
crc = 1 if crc_enabled else 0
|
||||
h = 0 if explicit_header else 1 # H=0 for explicit, H=1 for implicit
|
||||
|
||||
# Low data rate optimization: required for SF11/SF12 at 125kHz
|
||||
de = 1 if (sf >= 11 and bandwidth_hz <= 125000) else 0
|
||||
de = 1 if (sf >= 11 and bw_hz <= 125000) else 0
|
||||
|
||||
# Symbol time in milliseconds: T_sym = 2^SF / BW_kHz
|
||||
t_sym = (2 ** sf) / bw_khz
|
||||
|
||||
Reference in New Issue
Block a user