int main() { Bdisp_AllClr_VRAM(); Bdisp_EnableColor(1); DefineStatusAreaFlags(3, SAF_BATTERY | SAF_TEXT | SAF_GLYPH | SAF_ALPHA_SHIFT, 0, 0); // disable Catalog function throughout the add-in, as we don't know how to make use of it: Bkey_SetAllFlags(0x80); printf("Welcome to Eigenmath\n"); printf("To see version information,\npress Shift then Menu.\n"); run_startup_script(); aborttimer = Timer_Install(0, check_execution_abort, 100); if (aborttimer > 0) { Timer_Start(aborttimer); } //in case we're running in a strip, check if this strip has a script to run. if(is_running_in_strip()) { int MCSsize; MCSGetDlen2(DIRNAME, SCRIPTFILE, &MCSsize); if (MCSsize > 0) { // there is a script to run... unsigned char* asrc = (unsigned char*)alloca(MCSsize*sizeof(unsigned char)+5); // 5 more bytes to make sure it fits... MCSGetData1(0, MCSsize, asrc); // read script from MCS execution_in_progress = 1; run((char*)asrc); execution_in_progress = 0; } } input_eval_loop(0); }
void script_recorder() { printf("Recording started: every\n"); printf("command you enter from now on\n"); printf("will be recorded, so that you\n"); printf("can create a script.\n"); printf("When you're done recording,\n"); printf("call \"record\" again.\n"); input_eval_loop(1); }
extern "C" void eigenmath_main() { LCD_Clear(0xffff); dPrintf("ArithMax EV3\nOS 1.0.DEV\n"); input_eval_loop(); }