Ken Van Hoeylandt 15f4fbfdc6
Merge Develop into Main (#300)
- Made an external app from internal Calculator app
- Update tactility.py to v1.2.0 (fix bug with selfupdate)
- Added warning to Development service UI
- Add context to `SECURITY.md`
- Split `ObjectFileReader` and `ObjectFileWriter` into separate cpp files
- Fix related to GPS config read errors
2025-08-02 12:28:28 +02:00

27 lines
614 B
C++

#pragma once
#include "tt_app.h"
#include <lvgl.h>
#include "Str.h"
#include "Dequeue.h"
class Calculator {
lv_obj_t* displayLabel;
lv_obj_t* resultLabel;
char formulaBuffer[128] = {0}; // Stores the full input expression
bool newInput = true;
static void button_event_cb(lv_event_t* e);
void handleInput(const char* txt);
void evaluateExpression();
double computeFormula();
static Dequeue<Str> infixToRPN(const Str& infix);
static double evaluateRPN(Dequeue<Str> rpnQueue);
void resetCalculator();
public:
void onShow(AppHandle context, lv_obj_t* parent);
};