#ifndef TOOLS_h
#define TOOLS_h

#include <Arduino.h>
#include "Streaming.h"
//#include "Cama_commands.h"

class MyTools
{
public:
    MyTools();
    static uint8_t dec2bin(char);
    static String byteToHex(byte);
    static uint8_t hex2bin(char);
    static uint64_t StringTo64(String);
    static void printHex(uint8_t *buffer, uint8_t bufferSize);
    static void printDec(uint8_t *buffer, uint8_t bufferSize);
    void dump_byte_array(uint8_t *buffer, uint16_t bufferSize);
    void convertHexStringToByteArray(uint8_t *buffer, uint64_t len, String cmd);
    uint16_t calculateCKS(String command);
    uint16_t calc_battery_percentage(uint16_t adc);
    uint8_t parseMessage(String *array, String message);
    uint8_t bcd2bin(uint8_t bcd);
    bool compareByteArrays(size_t size, uint8_t *card_code, char *pass);
    bool isTimeValid(uint8_t *buffer);

private:
protected:
};

#endif