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
This commit is contained in:
committed by
GitHub
parent
982fce9207
commit
15f4fbfdc6
@@ -0,0 +1,27 @@
|
||||
#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);
|
||||
};
|
||||
Reference in New Issue
Block a user