mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 02:43:15 +00:00
- 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
27 lines
614 B
C++
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);
|
|
}; |