diff --git a/README.md b/README.md index f9e29d27da13e2355b5a5df2d54446bf872b5f37..d119b3c9ea3e7e306e0b4cbd159096817d48109c 100644 --- a/README.md +++ b/README.md @@ -135,12 +135,15 @@ Byte Offset | Description 62 | LUT entry #30, low byte 63 | LUT entry #30, high byte -A type 2 packet sets optional device-wide configuration settings. Right now it's just used to disable dithering for debug or side-by-side comparison purposes. Other bytes in this packet are reserved. - -Byte Offset | Description -------------- | ------------ -0 | Control byte -1 | Flags. Bit 0: Disable dithering +A type 2 packet sets optional device-wide configuration settings: + +Byte Offset | Bits | Description +----------- | ------ | ------------ +0 | 7 … 0 | Control byte +1 | 7 … 2 | (reserved) +1 | 1 | Disable keyframe interpolation +1 | 0 | Disable dithering +2 … 63 | 7 … 0 | (reserved) Contact diff --git a/firmware/fadecandy.cpp b/firmware/fadecandy.cpp index b6a17b61b35f869c6482f5ae39033a2422c5f4a7..53c30db3af726ee019e11e987effe7da9dcb384d 100644 --- a/firmware/fadecandy.cpp +++ b/firmware/fadecandy.cpp @@ -54,6 +54,11 @@ static uint32_t calculateInterpCoefficient() * how long the interpolation between those keyframes should take. */ + if (buffers.flags & CFLAG_NO_INTERPOLATION) { + // Always use fbNext + return 0x10000; + } + uint32_t now = millis(); uint32_t tsPrev = buffers.fbPrev->timestamp; uint32_t tsNext = buffers.fbNext->timestamp; diff --git a/firmware/fc_usb.h b/firmware/fc_usb.h index 5d69081777ef654095905c3e63188c5de5d72d0f..d1a019efd77aee667de56e7fb427a1730bbb42bf 100644 --- a/firmware/fc_usb.h +++ b/firmware/fc_usb.h @@ -95,6 +95,7 @@ struct fcColorLUT : public fcPacketBuffer<PACKETS_PER_LUT> */ #define CFLAG_NO_DITHERING (1 << 0) +#define CFLAG_NO_INTERPOLATION (1 << 1) /*