Luke Cartwright / Mbed 2 deprecated ELEC2645_Project_el18loc_nearlythere

Dependencies:   mbed

LUTs/LUTs_debug.h

Committer:
lukeocarwright
Date:
2020-05-06
Revision:
10:258a1eca02cc
Parent:
9:f6ba53e355a0
Child:
11:6ae098535da9

File content as of revision 10:258a1eca02cc:

#ifndef LUTS_DEBUG_H
#define LUTS_DEBUG_H

/** Spaceship Test
@brief Checks LUT values are correct
@author Luke Cartwright, University of Leeds
@date May 2020
@return true if debug is passed
*/

// Objects
LUTs luts;

bool sin_debug(int i, int expected_sin)
{
    //method
    luts.sin_wavetable();

    if (sin_wavtable[i]==expected_sin) {
        return (1);
    } else {
        return(0);
    }
}

bool tri_debug(int pulsewidth,int i, int expected_tri)
{
    //method
    luts.tri_wavetable(pulsewidth);

    if (tri_wavtable[i]==expected_tri) {
        return (1);
    } else {
        return(0);
    }
}

#endif