#include <stdio.h>
#include <stdint.h>

static float prv_detector_cur_get_amps(void)
{
    const uint32_t dac1 = 2000;
    const float  Io   = (((4096 - (float) dac1) * 3.3f) / 4096) /
                       10000.0; /* offset current */
    const int32_t a      = 0;
    const int32_t b      = 0;
    int32_t       iadc   = 32768 - a;
    const float Ia     = Io + ((((float) iadc * 3.3f) / 65536) /
                             16000.0);
    iadc                 = 32768 - b;
    const float Ib     = Io + ((((float) iadc * 3.3f) / 65536) /
                             16000.0);
    const float Isense = Ia + Ib;
    return Isense;
}

int main(void) {
	// your code goes here
	printf("%f", (prv_detector_cur_get_amps() * 1e3) / 28.f);
	return 0;
}
