1
0
mirror of https://github.com/daniviga/bite.git synced 2024-11-23 13:26:14 +01:00
bite/freedcs/telemetry/serializers.py
Daniele Viganò e4a3684951
Enable NTP (#6)
* Add ntpd server to the stack

* Enable NTP updates on Arduino

* Fix telemetry when clock is 0
2020-06-03 18:53:33 +02:00

21 lines
547 B
Python

from rest_framework import serializers
from api.serializers import DeviceSerializer
from telemetry.models import Telemetry
class TelemetrySerializer(serializers.ModelSerializer):
# device = DeviceSerializer(read_only=True)
def validate(self, data):
return data
class Meta:
model = Telemetry
fields = ('time', 'device', 'clock', 'payload',)
# class WhiteListSerializer(serializers.ModelSerializer):
# class Meta:
# model = Device
# fields = ('serial', 'creation_time', 'updated_time',)