<commit_before>#include "app_logprint.h"
#include "main.h"
#include "pagebrowser.h"
#include "crosstable.h"
#include "automation.h"
#include <QMessageBox>

// OCTOPUS STATUS
#define STATUS_IDLE       0
#define STATUS_STARTING   1
#define STATUS_READY      2
#define STATUS_TESTING    3
#define STATUS_DONE       4
#define STATUS_RESETTING  5
#define STATUS_STOPPING   6
#define STATUS_ERROR      7

// TEST_STATUS
#define TEST_STATUS_LOCAL  0x0000
#define TEST_STATUS_REMOTE 0x00D8
#define TEST_STATUS_DONE   0x002A

// LOCAL DIGITAL INPUTS
#define PLC_PWR_SWITCH PLC_DigIn_1
#define PLC_GO_BUTTON PLC_DigIn_4

// PRODUCT_NAMES <-- PRODUCT_ID
static char product_name[][15] = {
    /*00*/ "-",
    /*01*/ "TP1043_01_A"   ,
    /*02*/ "TP1043_02_A"   ,
    /*03*/ "TP1043_02_B"   ,
    /*04*/ "TP1070_01_A"   ,
    /*05*/ "TP1070_01_B"   ,
    /*06*/ "TP1070_01_C"   ,
    /*07*/ "TPAC1005"      ,
    /*08*/ "TPAC1007_03"   ,
    /*09*/ "TPAC1007_04_AA",
    /*10*/ "TPAC1007_04_AB",
    /*11*/ "TPAC1007_04_AC",
    /*12*/ "TPAC1007_04_AD",
    /*13*/ "TPAC1007_04_AE",
    /*14*/ "TPAC1008_02_AA",
    /*15*/ "TPAC1008_02_AB",
    /*16*/ "TPAC1008_02_AD",
    /*17*/ "TPAC1008_02_AE",
    /*18*/ "TPAC1008_02_AF",
    /*19*/ "TPAC1008_03_AC",
    /*20*/ "TPAC1008_03_AD",
    /*21*/ "TPLC050_01_AA" ,
    /*22*/ "TPLC100_01_AA" ,
    /*23*/ "TPLC100_01_AB" ,
    /*24*/ "TPX1043_03_C"  ,
    /*25*/ "TPX1070_03_D"  ,
    /*26*/ "TPX1070_03_E"
};
#define PRODUCT_MAX 26
#define RECIPE_MAX 3
static char recipe_name[][RECIPE_MAX] = {"-", "1", "2", "3"};

#define abs(v) (((v) > 0)? (v):-(v))

// TST_... (Zeroes)
QList<u_int16_t> zeroesIndexes;
QList<u_int32_t> zeroesTable[MAX_RCP_STEP];
// TST_...
QList<u_int16_t> testsIndexes;
QList<u_int32_t> testsTable[MAX_RCP_STEP];
// VAL_...
QList<u_int16_t> valuesIndexes;
QList<u_int32_t> valuesTable[MAX_RCP_STEP];

static void doReload();
extern int checkRecipe(int step, QList<u_int16_t> *indexes, QList<u_int32_t> table[]);

static u_int16_t previous_PLC_Heartbeat;
static u_int16_t previous_MPNC_HeartBeat;
static float previous_PLC_time;
static float last_PLC_time;
static page300 *thePage = NULL;

void setup(void)
{<commit_msg>recipe 4: fix<commit_after>#include "app_logprint.h"
#include "main.h"
#include "pagebrowser.h"
#include "crosstable.h"
#include "automation.h"
#include <QMessageBox>

// OCTOPUS STATUS
#define STATUS_IDLE       0
#define STATUS_STARTING   1
#define STATUS_READY      2
#define STATUS_TESTING    3
#define STATUS_DONE       4
#define STATUS_RESETTING  5
#define STATUS_STOPPING   6
#define STATUS_ERROR      7

// TEST_STATUS
#define TEST_STATUS_LOCAL  0x0000
#define TEST_STATUS_REMOTE 0x00D8
#define TEST_STATUS_DONE   0x002A

// LOCAL DIGITAL INPUTS
#define PLC_PWR_SWITCH PLC_DigIn_1
#define PLC_GO_BUTTON PLC_DigIn_4

// PRODUCT_NAMES <-- PRODUCT_ID
static char product_name[][15] = {
    /*00*/ "-",
    /*01*/ "TP1043_01_A"   ,
    /*02*/ "TP1043_02_A"   ,
    /*03*/ "TP1043_02_B"   ,
    /*04*/ "TP1070_01_A"   ,
    /*05*/ "TP1070_01_B"   ,
    /*06*/ "TP1070_01_C"   ,
    /*07*/ "TPAC1005"      ,
    /*08*/ "TPAC1007_03"   ,
    /*09*/ "TPAC1007_04_AA",
    /*10*/ "TPAC1007_04_AB",
    /*11*/ "TPAC1007_04_AC",
    /*12*/ "TPAC1007_04_AD",
    /*13*/ "TPAC1007_04_AE",
    /*14*/ "TPAC1008_02_AA",
    /*15*/ "TPAC1008_02_AB",
    /*16*/ "TPAC1008_02_AD",
    /*17*/ "TPAC1008_02_AE",
    /*18*/ "TPAC1008_02_AF",
    /*19*/ "TPAC1008_03_AC",
    /*20*/ "TPAC1008_03_AD",
    /*21*/ "TPLC050_01_AA" ,
    /*22*/ "TPLC100_01_AA" ,
    /*23*/ "TPLC100_01_AB" ,
    /*24*/ "TPX1043_03_C"  ,
    /*25*/ "TPX1070_03_D"  ,
    /*26*/ "TPX1070_03_E"
};
#define PRODUCT_MAX 26
#define RECIPE_MAX 4
static char recipe_name[][RECIPE_MAX] = {"-", "1", "2", "3", "4"};

#define abs(v) (((v) > 0)? (v):-(v))

// TST_... (Zeroes)
QList<u_int16_t> zeroesIndexes;
QList<u_int32_t> zeroesTable[MAX_RCP_STEP];
// TST_...
QList<u_int16_t> testsIndexes;
QList<u_int32_t> testsTable[MAX_RCP_STEP];
// VAL_...
QList<u_int16_t> valuesIndexes;
QList<u_int32_t> valuesTable[MAX_RCP_STEP];

static void doReload();
extern int checkRecipe(int step, QList<u_int16_t> *indexes, QList<u_int32_t> table[]);

static u_int16_t previous_PLC_Heartbeat;
static u_int16_t previous_MPNC_HeartBeat;
static float previous_PLC_time;
static float last_PLC_time;
static page300 *thePage = NULL;

void setup(void)
{
{'fraction_non_alphanumeric': 0.16219931271477664, 'fraction_numerical': 0.11958762886597939, 'mean_word_length': 3.684549356223176, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5888658', 'n_tokens_mistral': 2271, 'n_tokens_neox': 1941, 'n_words': 357}