This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DevicePayloadView(APIView): | |
SUBMETER_TYPE = 1 | |
CONCENTRATOR_TYPE = 2 | |
authentication_classes = () | |
permission_classes = () | |
def post(self, request, eui): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Monopolizing two cores that should reset the watchdog timer. | |
*/ | |
#include "esp_attr.h" | |
#include "esp_log.h" | |
#include "esp_system.h" | |
#include "esp_task_wdt.h" | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/task.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from django.db import models | |
from django.db.models import Case, When, Q | |
from django.db.models.expressions import Value, F | |
class WidgetManager(models.Manager): | |
def with_user_status(self, user: User = None): | |
"""This approach duplicates the same widget for each UserStatus""" | |
return self.annotate( |