Skip to content

Instantly share code, notes, and snippets.

Marco Silva marco-silva0000

View GitHub Profile
View tasks_v2.py
# tasks
from apps.spriklers.settings import app_settings
def irrigigation_dispacher_verification(minutes=app_settings.WATCHDOG_LOOKBACK_TIME):
pass
View settings_v2.py
# settings.py
FULGURIT = {
'SPRINKLERS': {
'WAIT_TIME_FOR_IRRIGATION_END': 15,
'WAIT_TIME_FOR_IRRIGATION_END_PER_GROUP': 5,
'WAIT_TIME_FOR_IRRIGATION_GROUP_START': 2,
'WATCHDOG_LOOKBACK_TIME': 3
},
'ENVIRONMENTAL_CONTROL': {
'SPEED_HYSTERESIS': 2.5,
View tasks_v1b.py
# tasks.py
from django.conf import settings
WATCHDOG_LOOKBACK_TIME = getattr(settings, 'WATCHDOG_LOOKBACK_TIME', 5)
def irrigigation_dispacher_verification_meh(minutes=WATCHDOG_LOOKBACK_TIME):
pass
View tasks_v1.py
# tasks.py
from django.conf import settings
def irrigigation_dispacher_verification_meh(minutes=getattr(settings, 'WATCHDOG_LOOKBACK_TIME', 5)):
pass
View demo_settings_v1.py
# settings.py
WAIT_TIME_FOR_IRRIGATION_END = 15
WAIT_TIME_FOR_IRRIGATION_END_PER_GROUP = 5
WAIT_TIME_FOR_IRRIGATION_GROUP_START = 2
WATCHDOG_LOOKBACK_TIME = 3
SPEED_HYSTERESIS = 2.5
ANGLE_HYSTERESIS = 15
MINIMUM_ACTUATION_CHANGE = 5
You can’t perform that action at this time.