Loading files
#include "Simulator.h"
#include "gui.h"
#include "Battery.h"
#include "pushpull.h"
static const uint16_t imagedata[1024] = {
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1082,0x39c7,0x31a6,0x18e3,0x1082,0x1082,0x10a2,0x0861,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1082,0x5aeb,0xbdd7,0x94b3,0x4208,0x2945,0x2945,0x5acb,0x632c,0x0841,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0841,0x39c7,0x5acb,0x9cd3,0x94b2,0x94b2,0x9cd3,0x6b6d,0x3186,0x2945,0x2945,0x39c7,0x4208,0x2124,0x4a49,0x630c,0x3186,0x0020,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2945,0x52aa,0x630c,0xad55,0x9cd3,0x8c31,0x73ae,0x5aeb,0x31a6,0x31a6,0x31a6,0x31a6,0x3186,0x3186,0x5aeb,0x8c51,0x5acb,0x18c3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2124,0x4228,0x5aeb,0x9cd3,0x9cd3,0x9492,0x8c71,0x7bcf,0x52aa,0x528a,0x528a,0x4a69,0x4a69,0x4a49,0x632c,0x738e,0x4a49,0x18e3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2124,0x3186,0x39e7,0x8c51,0x7bef,0x6b6d,0x630c,0x4208,0x0841,0x0020,0x0020,0x0020,0x0020,0x0020,0x39c7,0x52ab,0x31a6,0x18e3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2124,0x31e6,0x4268,0x8cb1,0x7c4f,0x740d,0x63ac,0x4ae9,0x1962,0x1142,0x1141,0x1121,0x1101,0x1101,0x3a47,0x5b0a,0x31e6,0x18e3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x29e4,0x7e0c,0x96cf,0xbf56,0xbf55,0xb734,0xb733,0xa711,0x8ead,0x86ac,0x868c,0x866c,0x7e4b,0x7e0b,0x8e4e,0x964f,0x6509,0x2163,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3245,0x874b,0x976c,0xbf94,0xb793,0xb771,0xaf70,0x9f2d,0x76e7,0x76c7,0x76a6,0x6e86,0x6e85,0x6665,0x868a,0x96ad,0x7608,0x29e3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3245,0x8eea,0x972b,0xbf73,0xb752,0xaf50,0xa72e,0x96eb,0x76a4,0x6e84,0x6e63,0x6e43,0x6e43,0x6e23,0x8669,0x968c,0x7e08,0x29e3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3a25,0x96ca,0x9eeb,0xc753,0xbf31,0xb730,0xaf0e,0x9ecb,0x8664,0x7e44,0x7e43,0x7e23,0x7e23,0x7603,0x9669,0xa68c,0x8608,0x29e4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3a25,0x9e89,0xa6cb,0xcf33,0xc711,0xbef0,0xb6ee,0xaeab,0x8e24,0x8e03,0x8e03,0x8e03,0x85e3,0x85e3,0x9e49,0xae8c,0x95e8,0x31e4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3a25,0xa649,0xae8a,0xcf13,0xcef1,0xc6cf,0xbeae,0xb66a,0x9de4,0x95e3,0x95c3,0x95c3,0x95c3,0x95c3,0xae29,0xb66c,0x9de8,0x31c4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3a05,0xae09,0xbe4a,0xd6f2,0xced1,0xceaf,0xc68e,0xbe4a,0xa5a3,0xa5a3,0xa5a3,0xa583,0xa583,0x9d83,0xb609,0xbe4c,0xadc8,0x31c4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4205,0xbdc8,0xc60a,0xded2,0xd6b1,0xd68f,0xce4d,0xc60a,0xb563,0xad63,0xad63,0xad43,0xad42,0xad43,0xbde9,0xc62c,0xb5a8,0x39c4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x41e5,0xc5a8,0xcde9,0xdeb2,0xde90,0xd64f,0xd62d,0xcdca,0xbd23,0xbd22,0xbd22,0xbd22,0xbd02,0xbd02,0xc5a8,0xce0c,0xbd68,0x39c4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x41e5,0xcd68,0xd5a9,0xe692,0xe670,0xde2f,0xde0d,0xd5a9,0xc4e2,0xc4e2,0xc4e2,0xc4e2,0xc4e2,0xc4e2,0xd588,0xd5ec,0xc548,0x39a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x41e4,0xd527,0xdd69,0xee72,0xe630,0xe60e,0xe5cd,0xdd69,0xd4a2,0xd482,0xd482,0xd482,0xd482,0xd4a2,0xdd48,0xddcc,0xcd28,0x39a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x41c4,0xdce7,0xe528,0xee52,0xee10,0xedee,0xedac,0xe529,0xdc62,0xdc41,0xdc41,0xdc41,0xdc41,0xdc41,0xe528,0xe58c,0xdce7,0x41a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x49c4,0xe4a7,0xece8,0xf611,0xf5f0,0xedae,0xed6c,0xece9,0xe3e2,0xe3e1,0xe3e1,0xe3e1,0xe3e1,0xe3e1,0xecc8,0xed4b,0xdca7,0x4183,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x49a4,0xe427,0xec68,0xf5d2,0xf590,0xed4e,0xed0d,0xec69,0xe342,0xe341,0xe341,0xe341,0xe341,0xe341,0xe448,0xecec,0xdc47,0x4183,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4985,0xe3a8,0xebe9,0xf592,0xed30,0xecef,0xec8d,0xe3e9,0xdaa2,0xda82,0xdaa2,0xd2a2,0xd2a2,0xd2a2,0xdbc8,0xe48c,0xd3c8,0x4163,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4985,0xe328,0xeb69,0xf532,0xecd1,0xec8f,0xe42d,0xdb6a,0xd203,0xd1e2,0xc9e2,0xc9e2,0xc202,0xc202,0xcb48,0xd42c,0xc348,0x3943,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4965,0xe2a9,0xeaca,0xecf2,0xec71,0xe40f,0xe3ad,0xdaea,0xc943,0xc142,0xc142,0xb942,0xb942,0xb962,0xc2c8,0xcbac,0xbac8,0x3923,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4124,0xdaaa,0xe34d,0xed34,0xecf3,0xecb2,0xec71,0xe3ce,0xd289,0xd268,0xca68,0xca68,0xc268,0xc267,0xcb6c,0xcbee,0xaac9,0x3103,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2924,0x6a8a,0x938e,0xcdb6,0xc554,0xbcd3,0xac71,0xa3ae,0x8a8a,0x8289,0x8289,0x8289,0x8289,0x7a89,0x938d,0xa471,0x6acb,0x18c3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x10a2,0x4249,0x73ae,0xce79,0xbdd7,0xa514,0x8430,0x5acb,0x2124,0x2124,0x2124,0x2925,0x2925,0x2965,0x632c,0x8430,0x4208,0x0861,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0020,0x10a2,0x2124,0x2945,0x2945,0x2124,0x18e3,0x1082,0x1061,0x1061,0x0861,0x0861,0x0861,0x1082,0x0861,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
};
static Image_t icon = { .width = 32, .height = 32, .data = imagedata };
/* Forward declaration of actual app task */
static void Simulator(void *unused);
/* Creates the app task, called from desktop when user start the app */
static void Simulator_Start() {
xTaskCreate(Simulator, "Simulator", 1000, NULL, 3, NULL);
}
static Battery_t bat;
static uint8_t batLoaded = 0;
static TaskHandle_t handle;
static Entry *eSoC;
static Custom *batSchematic;
static inline void drawSource(coords_t c, const char *name, uint32_t value, uint32_t capacity) {
display_VerticalLine(c.x + 10, c.y, 13);
display_HorizontalLine(c.x, c.y + 13, 20);
display_HorizontalLine(c.x + 5, c.y + 17, 10);
display_VerticalLine(c.x + 10, c.y + 17, 13);
display_String(c.x+14, c.y + 2, name);
char valueString[8];
common_StringFromValue(valueString, 6, value, &Unit_Voltage);
display_SetForeground(COLOR_DARKGREEN);
display_String(c.x + 12, c.y + 22, valueString);
common_StringFromValue(valueString, sizeof(valueString), capacity, &Unit_Charge);
display_SetForeground(COLOR_GRAY);
display_String(c.x + 12, c.y + 30, valueString);
display_SetForeground(COLOR_BLACK);
}
static inline void drawResistor(coords_t c, const char *name, uint32_t value) {
display_Rectangle(c.x, c.y, c.x+30, c.y+10);
display_String(c.x+9, c.y-8, name);
char valueString[6];
common_StringFromValue(valueString, sizeof(valueString), value, &Unit_Resistance);
display_SetForeground(COLOR_GRAY);
display_String(c.x + 15 - 3 * sizeof(valueString), c.y + 12, valueString);
display_SetForeground(COLOR_BLACK);
}
static inline void drawCapacitor(coords_t c, const char *name, uint32_t value, uint32_t voltage) {
display_HorizontalLine(c.x, c.y+10, 13);
display_HorizontalLine(c.x + 17, c.y+10, 13);
display_VerticalLine(c.x+13, c.y, 20);
display_VerticalLine(c.x+17, c.y, 20);
display_String(c.x+19, c.y, name);
char valueString[7];
display_SetForeground(COLOR_GRAY);
common_StringFromValue(valueString, 6, value, &Unit_Capacity);
display_String(c.x + 15 - 3 * sizeof(valueString), c.y + 22, valueString);
display_SetForeground(COLOR_DARKGREEN);
common_StringFromValue(valueString, 7, voltage, &Unit_Voltage);
display_String(c.x + 15 - 3 * sizeof(valueString), c.y + 30, valueString);
display_SetForeground(COLOR_BLACK);
}
static void drawBattery(Widget &w, coords_t c) {
if (!batLoaded)
/* no profile loaded, don't draw anything */
return;
display_SetForeground(COLOR_BLACK);
display_SetBackground(COLOR_BG_DEFAULT);
display_SetFont(Font_Medium);
/* Draw E voltage source */
drawSource(COORDS(c.x + 5, c.y + 32), "E", bat.state.E, bat.capacity);
display_VerticalLine(c.x + 15, c.y + 15, 20);
display_VerticalLine(c.x + 15, c.y + 55, 25);
/* Draw internal resistance R1 */
display_HorizontalLine(c.x + 15, c.y+15, 20);
drawResistor(COORDS(c.x+35, c.y+10), "R1", bat.state.R1);
/* Draw internal RC element */
display_HorizontalLine(c.x + 65, c.y + 15, 30);
drawResistor(COORDS(c.x + 95, c.y + 10), "R2", bat.state.R2);
drawCapacitor(COORDS(c.x + 95, c.y + 35), "C", bat.state.C, bat.CVoltage);
/* Connecting lines */
display_HorizontalLine(c.x + 125, c.y + 15, 46);
display_HorizontalLine(c.x + 85, c.y + 45, 10);
display_HorizontalLine(c.x + 125, c.y + 45, 10);
display_VerticalLine(c.x + 85, c.y + 15, 30);
display_VerticalLine(c.x + 135, c.y + 15, 30);
/* Connecting dots */
display_CircleFull(c.x + 85, c.y + 15, 4);
display_CircleFull(c.x + 135, c.y + 15, 4);
/* Battery terminals */
display_Circle(c.x+175, c.y+15, 4);
display_Circle(c.x+175, c.y+80, 4);
display_HorizontalLine(c.x+15, c.y+80, 156);
}
/* Register this app */
void Simulator_Init() {
App_Register("Simulator", Simulator_Start, icon);
}
static uint8_t loadDialog = 0;
static uint8_t saveDialog = 0;
static void Simulator(void *unused) {
handle = xTaskGetCurrentTaskHandle();
batLoaded = 0;
if(bat.profile) {
/* Free any profile data from previous runs */
vPortFree(bat.profile);
}
memset(&bat, 0, sizeof(bat));
uint8_t on = 0;
int32_t voltage = 0;
int32_t current = 0;
int32_t energy = 0;
/* Create GUI elements */
Container *c= new Container(COORDS(280, 240));
c->setPosition(COORDS(40, 0));
/* Store and load profile */
Button *bLoad = new Button("Load", Font_Big, [](Widget &w) {
loadDialog = 1;
xTaskNotify(handle, SIGNAL_WAKEUP, eSetBits);
}, 130);
Button *bSave = new Button("Save", Font_Big, [](Widget &w) {
saveDialog = 1;
xTaskNotify(handle, SIGNAL_WAKEUP, eSetBits);
}, 130);
bSave->setSelectable(false);
c->attach(bLoad, COORDS(5, 5));
c->attach(bSave, COORDS(145, 5));
/* Voltage/current display */
SevenSegment *sVoltage = new SevenSegment(&voltage, 10, 3, 5, 2, COLOR_DARKGREEN);
SevenSegment *sCurrent = new SevenSegment(¤t, 10, 3, 5, 3, COLOR_RED);
SevenSegment *sEnergy = new SevenSegment(&energy, 10, 3, 5, 2, COLOR_BLUE);
c->attach(sVoltage, COORDS(185, 150));
c->attach(sCurrent, COORDS(185, 180));
c->attach(sEnergy, COORDS(185, 210));
Label *lV = new Label("V", Font_Big);
lV->setColor(COLOR_DARKGREEN);
Label *lA = new Label("A", Font_Big);
lA->setColor(COLOR_RED);
Label *lW = new Label("Wh", Font_Medium);
lW->setColor(COLOR_BLUE);
c->attach(lV, COORDS(267, 153));
c->attach(lA, COORDS(267, 183));
c->attach(lW, COORDS(267, 213));
Label *lOn = new Label(3, Font_Big, Label::Orientation::CENTER);
lOn->setText("OFF");
lOn->setColor(COLOR_GRAY);
c->attach(lOn, COORDS(225, 130));
/* Battery status */
Label *lSoC = new Label("State of charge:", Font_Big);
eSoC = new Entry((int32_t*) &bat.state.SoC, &maxPercent, &null, Font_Big, 6,
&Unit_Percent);
Label *lCapacity = new Label("Capacity:", Font_Big);
Entry *eCapacity = new Entry(&bat.capacityFull, NULL, &null, Font_Big, 8,
&Unit_Charge);
eSoC->setSelectable(false);
eCapacity->setSelectable(false);
eSoC->setCallback([](Widget &w) {
Battery_NewSoc(&bat, bat.state.SoC);
batSchematic->requestRedraw();
});
eCapacity->setCallback([](Widget &w) {
Battery_NewCapacity(&bat, bat.capacityFull);
batSchematic->requestRedraw();
eSoC->requestRedraw();
});
c->attach(lSoC, COORDS(2, 32));
c->attach(eSoC, COORDS(200, 30));
c->attach(lCapacity, COORDS(2, 57));
c->attach(eCapacity, COORDS(176, 55));
batSchematic = new Custom(COORDS(280, 90), drawBattery, nullptr);
c->attach(batSchematic, COORDS(0, 145));
/* Notify desktop of started app */
desktop_AppStarted(Simulator_Start, c);
pushpull_AcquireControl();
pushpull_SetAveraging(10);
pushpull_SetDriveCurrent(200);
pushpull_SetEnabled(0);
pushpull_SetInternalResistance(0);
pushpull_SetSinkCurrent(MAX_SINK_CURRENT);
pushpull_SetSourceCurrent(MAX_SOURCE_CURRENT);
uint32_t displayUpdate = xTaskGetTickCount();
while (1) {
/* Update output */
Battery_Interpolate(bat.profile, bat.npoints, &bat.state);
pushpull_SetVoltage(bat.state.E + bat.CVoltage);
pushpull_SetInternalResistance(bat.state.R1);
if (bat.state.SoC == 0 && pushpull_GetCurrent() > 1000) {
/* battery is completely empty but the load is still drawing current
* -> switch off output */
on = 0;
}
if (on != pushpull_GetEnabled()) {
pushpull_SetEnabled(on);
if (pushpull_GetEnabled()) {
lOn->setText("ON");
lOn->setColor(COLOR_RED);
} else {
lOn->setText("OFF");
lOn->setColor(COLOR_GRAY);
}
on = pushpull_GetEnabled();
}
if (xTaskGetTickCount() - displayUpdate > 300) {
displayUpdate = xTaskGetTickCount();
voltage = pushpull_GetBatteryVoltage() / 10000;
current = pushpull_GetCurrent() / 1000;
sVoltage->requestRedraw();
sCurrent->requestRedraw();
sEnergy->requestRedraw();
eSoC->requestRedraw();
batSchematic->requestRedraw();
}
uint32_t signal;
if (App_Handler(&signal, 300)) {
/* received a notification */
if (signal & SIGNAL_ONOFF_BUTTON) {
if (batLoaded) {
on = !on;
} else {
on = 0;
}
}
if (signal & SIGNAL_PUSHPULL_UPDATE) {
if (batLoaded) {
if (on) {
Battery_Update(&bat, pushpull_GetCurrent());
} else {
Battery_Update(&bat, 0);
}
}
}
if (loadDialog) {
char filename[_MAX_LFN + 1];
if (Dialog::FileChooser("Select Preset:", filename, "0:/",
"BAT") == Dialog::Result::OK) {
if (Battery_Load(&bat, filename) == 0) {
batLoaded = 1;
char msg[] = "Profile with xx\npoints loaded.";
msg[13] = bat.npoints / 10 + '0';
msg[14] = bat.npoints % 10 + '0';
Dialog::MessageBox("Loaded", Font_Big, msg,
Dialog::MsgBox::OK, NULL, true);
Battery_NewSoc(&bat, maxPercent);
/* Enable battery widgets */
bSave->setSelectable(true);
eSoC->setSelectable(true);
eCapacity->setSelectable(true);
} else {
Dialog::MessageBox("Error", Font_Big,
"Failed to read file", Dialog::MsgBox::OK, NULL,
true);
}
}
loadDialog = 0;
}
if (saveDialog) {
char filename[_MAX_LFN + 1];
if (Dialog::StringInput("Preset name:", filename, _MAX_LFN - 4)
== Dialog::Result::OK) {
/* add file extension */
strcat(filename, ".BAT");
if (!Battery_Save(&bat, filename) == 0) {
Dialog::MessageBox("Error", Font_Big,
"Failed to write file", Dialog::MsgBox::OK,
NULL, true);
}
}
saveDialog = 0;
}
}
}
}
8524e79feThis file is pinned to the selected release. Download the original to open it in your design tool.