From cfcb2903221a891f8d2fd58a453fe954bdbfafc7 Mon Sep 17 00:00:00 2001 From: Nicole Faerber Date: Sat, 16 Jan 2021 23:56:24 +0100 Subject: [PATCH] First working GTK+ window with pretty fast update of the IR cam frames --- 77-flirone-lusb.rules | 3 + Makefile | 6 +- NOTES.txt | 28 ++ README.md | 4 + cam-thread.c | 661 ++++++++++++++++++++++++++++++++++++++++++ flirgtk.c | 226 +++++++++++---- palettes/15.h | 1 + palettes/17.h | 1 + palettes/7.h | 1 + palettes/85.h | 1 + palettes/92.h | 1 + palettes/Grayscale.h | 1 + palettes/Grey.h | 1 + palettes/Iron2.h | 1 + palettes/Iron_Black.h | 1 + palettes/Rainbow.h | 1 + plank.h | 11 + 17 files changed, 896 insertions(+), 53 deletions(-) create mode 100644 77-flirone-lusb.rules create mode 100644 NOTES.txt create mode 100644 cam-thread.c create mode 100644 palettes/15.h create mode 100644 palettes/17.h create mode 100644 palettes/7.h create mode 100644 palettes/85.h create mode 100644 palettes/92.h create mode 100644 palettes/Grayscale.h create mode 100644 palettes/Grey.h create mode 100644 palettes/Iron2.h create mode 100644 palettes/Iron_Black.h create mode 100644 palettes/Rainbow.h create mode 100644 plank.h diff --git a/77-flirone-lusb.rules b/77-flirone-lusb.rules new file mode 100644 index 0000000..daf3c51 --- /dev/null +++ b/77-flirone-lusb.rules @@ -0,0 +1,3 @@ + +LABEL="flirone-libusb" +SUBSYSTEM=="usb", ATTRS{idVendor}=="09cb", ATTRS{idProduct}=="1996", MODE="0666" diff --git a/Makefile b/Makefile index 7faa625..7d2d6dc 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ CC=gcc -CFLAGS=-O2 -Wall `pkg-config --cflags gtk+-3.0` -LIBS=`pkg-config --libs gtk+-3.0` +CFLAGS=-O2 -Wall -D_REENTRANT `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libusb-1.0` +LIBS=`pkg-config --libs gtk+-3.0` `pkg-config --libs libusb-1.0` -lm -OBJ=flirgtk.o +OBJ=flirgtk.o cam-thread.o PRG=flirgtk all: $(PRG) diff --git a/NOTES.txt b/NOTES.txt new file mode 100644 index 0000000..96a7ffa --- /dev/null +++ b/NOTES.txt @@ -0,0 +1,28 @@ +int stride; +unsigned char *data; +cairo_surface_t *surface; + +stride = cairo_format_stride_for_width (format, width); +data = malloc (stride * height); +surface = cairo_image_surface_create_for_data (data, format, + width, height, + stride); + +cairo_surface_t * +cairo_image_surface_create_for_data (unsigned char *data, + cairo_format_t format, + int width, + int height, + int stride); + +CAIRO_FORMAT_RGB24 +each pixel is a 32-bit quantity, with the upper 8 bits unused. Red, Green, and Blue are stored in the remaining 24 bits in that order. (Since 1.0) + +CAIRO_FORMAT_ARGB32 +each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then red, then green, then blue. The 32-bit quantities are stored native-endian. Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) (Since 1.0) + + +unsigned char * cairo_image_surface_get_data (cairo_surface_t *surface); +get pointer to imag data for inspection _and_ manipulation + + diff --git a/README.md b/README.md index 7818bce..9b2f81e 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,7 @@ GTK+ application for FLIR ONE USB thermal camera based on flir-v4l: https://github.com/fnoop/flirone-v4l2 + + +cp 77-flirone-lusb.rules /lib/udev/rules.d/ +udevadm control --reload-rules diff --git a/cam-thread.c b/cam-thread.c new file mode 100644 index 0000000..979fff1 --- /dev/null +++ b/cam-thread.c @@ -0,0 +1,661 @@ +#include + +// from main thread +void update_fb(void); +extern unsigned char *fbdata; +extern gboolean flir_run; +extern unsigned char *color_palette; + + + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "plank.h" + + +// -----------------START-ORG-CODE------------------------------------------ + + +// #include "jpeglib.h" + + +// -- define v4l2 --------------- +// #include +#include +#include +#include +#include + +#if 0 +#define VIDEO_DEVICE0 "/dev/video1" // gray scale thermal image +#define FRAME_WIDTH0 160 +#define FRAME_HEIGHT0 120 + +#define VIDEO_DEVICE1 "/dev/video2" // color visible image +#define FRAME_WIDTH1 640 +#define FRAME_HEIGHT1 480 + +#define VIDEO_DEVICE2 "/dev/video3" // colorized thermal image +#define FRAME_WIDTH2 160 +#define FRAME_HEIGHT2 128 + +#define FRAME_FORMAT0 V4L2_PIX_FMT_GREY +#define FRAME_FORMAT1 V4L2_PIX_FMT_MJPEG +#define FRAME_FORMAT2 V4L2_PIX_FMT_RGB24 + +struct v4l2_capability vid_caps0; +struct v4l2_capability vid_caps1; +struct v4l2_capability vid_caps2; + +struct v4l2_format vid_format0; +struct v4l2_format vid_format1; +struct v4l2_format vid_format2; + +size_t framesize0; +size_t linewidth0; + +size_t framesize1; +size_t linewidth1; + +size_t framesize2; +size_t linewidth2; + + +const char *video_device0=VIDEO_DEVICE0; +const char *video_device1=VIDEO_DEVICE1; +const char *video_device2=VIDEO_DEVICE2; + +int fdwr0 = 0; +int fdwr1 = 0; +int fdwr2 = 0; + +// -- end define v4l2 --------------- +#endif + +#define VENDOR_ID 0x09cb +#define PRODUCT_ID 0x1996 + +static struct libusb_device_handle *devh = NULL; +int filecount=0; +struct timeval t1, t2; +long long fps_t; + +int FFC = 0; // detect FFC + +// -- buffer for EP 0x85 chunks --------------- +#define BUF85SIZE 1048576 // size got from android app +int buf85pointer = 0; +unsigned char buf85[BUF85SIZE]; + + + +double +raw2temperature(unsigned short RAW) +{ + // mystery correction factor + RAW *=4; + // calc amount of radiance of reflected objects ( Emissivity < 1 ) + double RAWrefl=PlanckR1/(PlanckR2*(exp(PlanckB/(TempReflected+273.15))-PlanckF))-PlanckO; + // get displayed object temp max/min + double RAWobj=(RAW-(1-Emissivity)*RAWrefl)/Emissivity; + // calc object temperature + + return PlanckB/log(PlanckR1/(PlanckR2*(RAWobj+PlanckO))+PlanckF)-273.15; +} + + +void vframe(char ep[],char EP_error[], int r, int actual_length, unsigned char buf[], unsigned char *colormap) +{ + // error handler + time_t now1; + now1 = time(NULL); + if (r < 0) { + if (strcmp (EP_error, libusb_error_name(r))!=0) { + strcpy(EP_error, libusb_error_name(r)); + fprintf(stderr, "\n: %s >>>>>>>>>>>>>>>>>bulk transfer (in) %s:%i %s\n", ctime(&now1), ep , r, libusb_error_name(r)); + sleep(1); + } + return; + } + + // reset buffer if the new chunk begins with magic bytes or the buffer size limit is exceeded + unsigned char magicbyte[4]={0xEF,0xBE,0x00,0x00}; + + if ((strncmp ((char *)buf, (char *)magicbyte,4)==0 ) || ((buf85pointer + actual_length) >= BUF85SIZE)) { + //printf(">>>>>>>>>>>begin of new frame<<<<<<<<<<<<<\n"); + buf85pointer=0; + } + + // printf("actual_length %d !!!!!\n", actual_length); + + memmove(buf85+buf85pointer, buf, actual_length); + buf85pointer=buf85pointer+actual_length; + + if ((strncmp ((char *)buf85, (char *)magicbyte,4)!=0 )) { + //reset buff pointer + buf85pointer=0; + printf("Reset buffer because of bad Magic Byte!\n"); + return; + } + + // a quick and dirty job for gcc + uint32_t FrameSize = buf85[ 8] + (buf85[ 9] << 8) + (buf85[10] << 16) + (buf85[11] << 24); + uint32_t ThermalSize = buf85[12] + (buf85[13] << 8) + (buf85[14] << 16) + (buf85[15] << 24); + uint32_t JpgSize = buf85[16] + (buf85[17] << 8) + (buf85[18] << 16) + (buf85[19] << 24); + // uint32_t StatusSize = buf85[20] + (buf85[21] << 8) + (buf85[22] << 16) + (buf85[23] << 24); + + //printf("FrameSize= %d (+28=%d), ThermalSize %d, JPG %d, StatusSize %d, Pointer %d\n",FrameSize,FrameSize+28, ThermalSize, JpgSize,StatusSize,buf85pointer); + + if ( (FrameSize+28) > (buf85pointer) ) { + // wait for next chunk + return; + } + + int v; + // get a full frame, first print the status + t1=t2; + gettimeofday(&t2, NULL); + // fps as moving average over last 20 frames + // fps_t = (19*fps_t+10000000/(((t2.tv_sec * 1000000) + t2.tv_usec) - ((t1.tv_sec * 1000000) + t1.tv_usec)))/20; + + filecount++; + // printf("#%08i %lld/10 fps:",filecount,fps_t); + // for (i = 0; i < StatusSize; i++) { + // v=28+ThermalSize+JpgSize+i; + // if(buf85[v]>31) {printf("%c", buf85[v]);} + // } + // printf("\n"); + + buf85pointer=0; + + unsigned short pix[160*120]; // original Flir 16 Bit RAW + int x, y; + unsigned char *fb_proc,*fb_proc2; + + fb_proc = malloc(160 * 128); // 8 Bit gray buffer really needs only 160 x 120 + memset(fb_proc, 128, 160*128); // sizeof(fb_proc) doesn't work, value depends from LUT + + fb_proc2 = malloc(160 * 128 * 3); // 8x8x8 Bit RGB buffer + + int min = 0x10000, max = 0; + float rms = 0; + + // Make a unsigned short array from what comes from the thermal frame + // find the max, min and RMS (not used yet) values of the array + int maxx, maxy; + for (y = 0; y < 120; ++y) { + for (x = 0; x < 160; ++x) { + if (x<80) + v = buf85[2*(y * 164 + x) +32]+256*buf85[2*(y * 164 + x) +33]; + else + v = buf85[2*(y * 164 + x) +32+4]+256*buf85[2*(y * 164 + x) +33+4]; + pix[y * 160 + x] = v; // unsigned char!! + + if (v < min) + min = v; + if (v > max) { + max = v; maxx = x; maxy = y; + } + rms += v * v; + } + } + + // RMS used later + // rms /= 160 * 120; + // rms = sqrtf(rms); + + // scale the data in the array + int delta = max - min; + if (!delta) + delta = 1; // if max = min we have divide by zero + int scale = 0x10000 / delta; + + for (y = 0; y < 120; ++y) { //120 + for (x = 0; x < 160; ++x) { //160 + int v = (pix[y * 160 + x] - min) * scale >> 8; + + // fb_proc is the gray scale frame buffer + fb_proc[y * 160 + x] = v; // unsigned char!! + } + } + + char st1[100]; + char st2[100]; + struct tm *loctime; + // Convert it to local time and Print it out in a nice format. + loctime = localtime (&now1); + strftime (st1, 60, "%H:%M:%S", loctime); + + // calc medium of 2x2 center pixels + int med = (pix[59 * 160 + 79]+pix[59 * 160 + 80]+pix[60 * 160 + 79]+pix[60 * 160 + 80])/4; + sprintf(st2," %.1f/%.1f/%.1f'C", raw2temperature(min),raw2temperature(med),raw2temperature(max)); + strcat(st1, st2); + + #define MAXC 26 // max chars in line 160/6=26,6 + strncpy(st2, st1, MAXC); + // write zero to string !! + st2[MAXC-1] = '\0'; + fprintf(stderr,"%s\r",st2); + // font_write(fb_proc, 1, 120, st2); + + // show crosshairs, remove if required + // font_write(fb_proc, 80-2, 60-3, "+"); + + maxx -= 4; + maxy -= 4; + + if (maxx < 0) + maxx = 0; + if (maxy < 0) + maxy = 0; + if (maxx > 150) + maxx = 150; + if (maxy > 110) + maxy = 110; + + // font_write(fb_proc, 160-6, maxy, "<"); + // font_write(fb_proc, maxx, 120-8, "|"); + + for (y = 0; y < 120; ++y) { + for (x = 0; x < 160; ++x) { + unsigned int *p1, *pc; + // fb_proc is the gray scale frame buffer + v=fb_proc[y * 160 + x] ; // unsigned char!! +#if 0 + // fb_proc2 is an 24bit RGB buffer + fb_proc2[3*y * 160 + x*3] = colormap[3 * v]; // unsigned char!! + fb_proc2[(3*y * 160 + x*3)+1] = colormap[3 * v + 1]; // unsigned char!! + fb_proc2[(3*y * 160 + x*3)+2] = colormap[3 * v + 2]; // unsigned char!! +#else + //fbdata[4*y * 640 + x*4] = colormap[3 * v + 2]; // B + //fbdata[(4*y * 640 + x*4)+1] = colormap[3 * v + 1]; // G + //fbdata[(4*y * 640 + x*4)+2] = colormap[3 * v]; // R + //fbdata[(4*y * 640 + x*4)+3] = 0x00; // empty + + // assemble one 32 bit pixel + fbdata[16*y * 640 + x*16] = color_palette[3 * v + 2]; // B + fbdata[(16*y * 640 + x*16)+1] = color_palette[3 * v + 1]; // G + fbdata[(16*y * 640 + x*16)+2] = color_palette[3 * v]; // R + fbdata[(16*y * 640 + x*16)+3] = 0x00; // empty + + // copy whole 32bit words hor/vert + p1 = (unsigned int *)&fbdata[16*y * 640 + x*16]; + // quadruple horizontally + pc = (unsigned int *)&fbdata[(16*y * 640 + x*16)+4]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(16*y * 640 + x*16)+8]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(16*y * 640 + x*16)+12]; + *pc = *p1; + + // quadruple vertically+1 + pc = (unsigned int *)&fbdata[(4*((y*4)+1) * 640 + x*16)]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+1) * 640 + x*16)+4]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+1) * 640 + x*16)+8]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+1) * 640 + x*16)+12]; + *pc = *p1; + + pc = (unsigned int *)&fbdata[(4*((y*4)+2) * 640 + x*16)]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+2) * 640 + x*16)+4]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+2) * 640 + x*16)+8]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+2) * 640 + x*16)+12]; + *pc = *p1; + + pc = (unsigned int *)&fbdata[(4*((y*4)+3) * 640 + x*16)]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+3) * 640 + x*16)+4]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+3) * 640 + x*16)+8]; + *pc = *p1; + pc = (unsigned int *)&fbdata[(4*((y*4)+3) * 640 + x*16)+12]; + *pc = *p1; +#endif + } + } + + // write video to v4l2loopback(s) + // write(fdwr0, fb_proc, framesize0); // gray scale Thermal Image + //write(fdwr1, &buf85[28+ThermalSize], JpgSize); // jpg Visual Image + + if (strncmp ((char *)&buf85[28+ThermalSize+JpgSize+17],"FFC",3)==0) { + FFC=1; // drop all FFC frames + } else { + if (FFC==1) { + FFC=0; // drop first frame after FFC + } else { + // write(fdwr2, fb_proc2, framesize2); // colorized RGB Thermal Image + } + } + + // free memory + free(fb_proc); // thermal RAW + free(fb_proc2); // visible jpg + + update_fb(); +} + +static int +find_lvr_flirusb(void) +{ + devh = libusb_open_device_with_vid_pid(NULL, VENDOR_ID, PRODUCT_ID); + + return devh ? 0 : -EIO; +} + +void +print_bulk_result(char ep[],char EP_error[], int r, int actual_length, unsigned char buf[]) +{ +time_t now1; +int i; + + now1 = time(NULL); + if (r < 0) { + if (strcmp (EP_error, libusb_error_name(r))!=0) { + strcpy(EP_error, libusb_error_name(r)); + fprintf(stderr, "\n: %s >>>>>>>>>>>>>>>>>bulk transfer (in) %s:%i %s\n", ctime(&now1), ep , r, libusb_error_name(r)); + sleep(1); + } + //return 1; + } else { + printf("\n: %s bulk read EP %s, actual length %d\nHEX:\n",ctime(&now1), ep ,actual_length); + // write frame to file + /* + char filename[100]; + sprintf(filename, "EP%s#%05i.bin",ep,filecount); + filecount++; + FILE *file = fopen(filename, "wb"); + fwrite(buf, 1, actual_length, file); + fclose(file); + */ + // hex print of first byte + for (i = 0; i < (((200)<(actual_length))?(200):(actual_length)); i++) { + printf(" %02x", buf[i]); + } + + printf("\nSTRING:\n"); + for (i = 0; i < (((200)<(actual_length))?(200):(actual_length)); i++) { + if (buf[i]>31) { + printf("%c", buf[i]); + } + } + printf("\n"); + } +} + +int +EPloop(unsigned char *colormap) +{ +int r = 1; + + r = libusb_init(NULL); + if (r < 0) { + fprintf(stderr, "failed to initialise libusb\n"); + return(1); + } + + r = find_lvr_flirusb(); + if (r < 0) { + fprintf(stderr, "Could not find/open device\n"); + goto out; + } + printf("Successfully found the Flir One G2 device\n"); + + r = libusb_set_configuration(devh, 3); + if (r < 0) { + fprintf(stderr, "libusb_set_configuration error %d\n", r); + goto out; + } + printf("Successfully set usb configuration 3\n"); + + + // Claiming of interfaces is a purely logical operation; + // it does not cause any requests to be sent over the bus. + r = libusb_claim_interface(devh, 0); + if (r <0) { + fprintf(stderr, "libusb_claim_interface 0 error %d\n", r); + goto out; + } + r = libusb_claim_interface(devh, 1); + if (r < 0) { + fprintf(stderr, "libusb_claim_interface 1 error %d\n", r); + goto out; + } + r = libusb_claim_interface(devh, 2); + if (r < 0) { + fprintf(stderr, "libusb_claim_interface 2 error %d\n", r); + goto out; + } + printf("Successfully claimed interface 0,1,2\n"); + + + unsigned char buf[1048576]; + int actual_length; + + time_t now; + // save last error status to avoid clutter the log + //char EP81_error[50]="", EP83_error[50]="", + char EP85_error[50]=""; + unsigned char data[2]={0,0}; // only a bad dummy + + // don't forget: $ sudo modprobe v4l2loopback video_nr=0,1 + // startv4l2(); + + int state = 1; + // int ct=0; + + while (flir_run) { + switch(state) { + case 1: + /* Flir config + 01 0b 01 00 01 00 00 00 c4 d5 + 0 bmRequestType = 01 + 1 bRequest = 0b + 2 wValue 0001 type (H) index (L) stop=0/start=1 (Alternate Setting) + 4 wIndex 01 interface 1/2 + 5 wLength 00 + 6 Data 00 00 + + libusb_control_transfer (*dev_handle, bmRequestType, bRequest, wValue, wIndex, *data, wLength, timeout) + */ + printf("stop interface 2 FRAME\n"); + r = libusb_control_transfer(devh,1,0x0b,0,2,data,0,100); + if (r < 0) { + fprintf(stderr, "Control Out error %d\n", r); + return r; + } + + printf("stop interface 1 FILEIO\n"); + r = libusb_control_transfer(devh,1,0x0b,0,1,data,0,100); + if (r < 0) { + fprintf(stderr, "Control Out error %d\n", r); + return r; + } + + printf("\nstart interface 1 FILEIO\n"); + r = libusb_control_transfer(devh,1,0x0b,1,1,data,0,100); + if (r < 0) { + fprintf(stderr, "Control Out error %d\n", r); + return r; + } + now = time(0); // Get the system time + printf("\n:xx %s",ctime(&now)); + state = 3; // jump over wait stait 2. Not really using any data from CameraFiles.zip + break; + case 2: + printf("\nask for CameraFiles.zip on EP 0x83:\n"); + now = time(0); // Get the system time + printf("\n: %s",ctime(&now)); + + int transferred = 0; + char my_string[128]; + + //--------- write string: {"type":"openFile","data":{"mode":"r","path":"CameraFiles.zip"}} + int length = 16; + unsigned char my_string2[16]={0xcc,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xF8,0xB3,0xF7,0x00}; + printf("\nEP 0x02 to be sent Hexcode: %i Bytes[",length); + int i; + for (i = 0; i < length; i++) { + printf(" %02x", my_string2[i]); + } + printf(" ]\n"); + + r = libusb_bulk_transfer(devh, 2, my_string2, length, &transferred, 0); + if (r == 0 && transferred == length) { + printf("\nWrite successful!"); + } else + printf("\nError in write! res = %d and transferred = %d\n", r, transferred); + + strcpy( my_string,"{\"type\":\"openFile\",\"data\":{\"mode\":\"r\",\"path\":\"CameraFiles.zip\"}}"); + + length = strlen(my_string)+1; + printf("\nEP 0x02 to be sent: %s", my_string); + + // avoid error: invalid conversion from ‘char*’ to ‘unsigned char*’ [-fpermissive] + unsigned char *my_string1 = (unsigned char*)my_string; + //my_string1 = (unsigned char*)my_string; + + r = libusb_bulk_transfer(devh, 2, my_string1, length, &transferred, 0); + if (r == 0 && transferred == length) { + printf("\nWrite successful!"); + printf("\nSent %d bytes with string: %s\n", transferred, my_string); + } else + printf("\nError in write! res = %d and transferred = %d\n", r, transferred); + + //--------- write string: {"type":"readFile","data":{"streamIdentifier":10}} + length = 16; + unsigned char my_string3[16]={0xcc,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0xef,0xdb,0xc1,0xc1}; + printf("\nEP 0x02 to be sent Hexcode: %i Bytes[",length); + for (i = 0; i < length; i++) { + printf(" %02x", my_string3[i]); + } + printf(" ]\n"); + + r = libusb_bulk_transfer(devh, 2, my_string3, length, &transferred, 0); + if(r == 0 && transferred == length) { + printf("\nWrite successful!"); + } else + printf("\nError in write! res = %d and transferred = %d\n", r, transferred); + + //strcpy( my_string, "{\"type\":\"setOption\",\"data\":{\"option\":\"autoFFC\",\"value\":true}}"); + strcpy( my_string,"{\"type\":\"readFile\",\"data\":{\"streamIdentifier\":10}}"); + length = strlen(my_string)+1; + printf("\nEP 0x02 to be sent %i Bytes: %s", length, my_string); + + // avoid error: invalid conversion from ‘char*’ to ‘unsigned char*’ [-fpermissive] + my_string1 = (unsigned char*)my_string; + + r = libusb_bulk_transfer(devh, 2, my_string1, length, &transferred, 0); + if (r == 0 && transferred == length) { + printf("\nWrite successful!"); + printf("\nSent %d bytes with string: %s\n", transferred, my_string); + } else + printf("\nError in write! res = %d and transferred = %d\n", r, transferred); + + // go to next state + now = time(0); // Get the system time + printf("\n: %s",ctime(&now)); + //sleep(1); + state = 3; + break; + case 3: + printf("\nAsk for video stream, start EP 0x85:\n"); + + r = libusb_control_transfer(devh,1,0x0b,1,2,data, 2,200); + if (r < 0) { + fprintf(stderr, "Control Out error %d\n", r); + return r; + }; + state = 4; + break; + case 4: + // endless loop + // poll Frame Endpoints 0x85 + // don't change timeout=100ms !! + r = libusb_bulk_transfer(devh, 0x85, buf, sizeof(buf), &actual_length, 100); + if (actual_length > 0) + vframe("0x85",EP85_error, r, actual_length, buf, colormap); + break; + } + + // poll Endpoints 0x81, 0x83 + r = libusb_bulk_transfer(devh, 0x81, buf, sizeof(buf), &actual_length, 10); + /* + if (actual_length > 0 && actual_length <= 101) { + char k[5]; + if (strncmp (&buf[32],"VoltageUpdate",13)==0) { + printf("xx %d\n",actual_length); + char *token, *string, *tofree, *string2; + // char l; + strcpy(string,buf); + // string = buf; + // assert(string != NULL); + printf("yy\n"); + + for (i = 32; i < (((200)<(actual_length))?(200):(actual_length)); i++) { + if (string[i]>31) { + printf("%c", string[i]); + // printf("%d ", i); + // string2[i-32] = string[i]; + } + } + + while ((token = strsep(&string, ":")) != NULL) { + printf("zz\n"); + printf("%s\n", token); + } + // free(tofree); + // for (i = 32; i < (((200)<(actual_length))?(200):(actual_length)); i++) { + // if(buf[i]>31) {printf("%c", buf[i]);} + // } + } + } + */ + + r = libusb_bulk_transfer(devh, 0x83, buf, sizeof(buf), &actual_length, 10); + if (strcmp(libusb_error_name(r), "LIBUSB_ERROR_NO_DEVICE")==0) { + fprintf(stderr, "EP 0x83 LIBUSB_ERROR_NO_DEVICE -> reset USB\n"); + goto out; + } + // print_bulk_result("0x83",EP83_error, r, actual_length, buf); + } + + // never reached ;-) + libusb_release_interface(devh, 0); + + out: + //close the device + if (devh != NULL) { + libusb_reset_device(devh); + libusb_close(devh); + libusb_exit(NULL); + } + + return r >= 0 ? r : -r; +} + + +// -----------------END-ORG-CODE-------------------------------------------- + + +gpointer cam_thread_main(gpointer user_data) +{ + EPloop(NULL); + + return NULL; +} + diff --git a/flirgtk.c b/flirgtk.c index 35fb60d..2b7161a 100644 --- a/flirgtk.c +++ b/flirgtk.c @@ -3,9 +3,30 @@ #include +#include "palettes/15.h" +#include "palettes/17.h" +#include "palettes/7.h" +#include "palettes/85.h" +#include "palettes/92.h" +#include "palettes/Grayscale.h" +#include "palettes/Grey.h" +#include "palettes/Iron2.h" +#include "palettes/Iron_Black.h" +#include "palettes/Rainbow.h" + static GtkWidget *window = NULL; +static GtkWidget *image_darea = NULL; static cairo_surface_t *surface = NULL; +// internal frame buffer with 640x480 pixels of 4 byte each, +// first byte unused, R, G, B 0x00RRGGBB +unsigned char fbuffer[640*480*4]; +unsigned char *fbdata; +unsigned char *color_palette; +gboolean flir_run = FALSE; + +gpointer cam_thread_main(gpointer user_data); + static gboolean configure_event (GtkWidget *widget, @@ -13,87 +34,192 @@ configure_event (GtkWidget *widget, gpointer data) { GtkAllocation allocation; -cairo_t *cr; +int stride; - if (surface) - cairo_surface_destroy (surface); + if (surface) + cairo_surface_destroy (surface); - gtk_widget_get_allocation (widget, &allocation); - surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget), - CAIRO_CONTENT_COLOR, - allocation.width, - allocation.height); - // cr = cairo_create (surface); + gtk_widget_get_allocation (widget, &allocation); + stride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, 640); + // g_printerr("stride %d\n", stride); + surface = cairo_image_surface_create_for_data (fbuffer, + CAIRO_FORMAT_RGB24, + 640, + 480, + stride); + fbdata = cairo_image_surface_get_data(surface); - g_printerr("configure event %d x %d\n", allocation.width, allocation.height); + g_printerr("configure event %d x %d\n", allocation.width, allocation.height); - /* We've handled the configure event, no need for further processing. */ - return TRUE; + /* We've handled the configure event, no need for further processing. */ + return TRUE; } -#if 0 -int stride; -unsigned char *data; -cairo_surface_t *surface; - -stride = cairo_format_stride_for_width (format, width); -data = malloc (stride * height); -surface = cairo_image_surface_create_for_data (data, format, - width, height, - stride); -#endif static gboolean draw_event (GtkWidget *widget, cairo_t *cr, gpointer data) { - g_printerr("draw event\n"); + // g_printerr("draw event\n"); - cairo_set_source_surface (cr, surface, 0, 0); - cairo_paint (cr); + cairo_set_source_surface (cr, surface, 0, 0); + cairo_paint (cr); - return FALSE; + return FALSE; +} + +void +update_fb(void) +{ +#if 0 +unsigned int x,y; +unsigned int *pdata; +static unsigned char cnt=0; + + cnt+=0x0f; + // g_printerr("cnt=%d\n", cnt); + for (y=0; y<480; y++) { + for (x=0; x<640; x++) { + pdata = (unsigned int *)&fbdata[(y*640*4)+(x*4)]; + *pdata = (cnt << 16) | (x << 9) | y; + } + } +#endif + gtk_widget_queue_draw(image_darea); +} + +void +start_clicked(GtkWidget *button, gpointer user_data) +{ + flir_run = TRUE; + g_thread_new ("CAM thread", cam_thread_main, NULL); +} + +void +stop_clicked(GtkWidget *button, gpointer user_data) +{ + flir_run = FALSE; } static void close_window (void) { - window = NULL; + // clean up and quit + window = NULL; + gtk_main_quit(); +} + +gboolean +handle_timeout (gpointer user_data) +{ + update_fb(); + + return TRUE; +} + +void +palette_changed (GtkComboBox *widget, gpointer user_data) +{ +int act; + + act = gtk_combo_box_get_active(widget); + if (act < 0) { + g_printerr("oops, palette selection = %d\n", act); + } else { + if (act == 0) color_palette = palette_7; + if (act == 1) color_palette = palette_15; + if (act == 2) color_palette = palette_17; + if (act == 3) color_palette = palette_85; + if (act == 4) color_palette = palette_92; + if (act == 5) color_palette = palette_Grayscale; + if (act == 6) color_palette = palette_Grey; + if (act == 7) color_palette = palette_Iron2; + if (act == 8) color_palette = palette_Iron_Black; + if (act == 9) color_palette = palette_Rainbow; + }; } GtkWidget * -do_drawingarea () +create_main_window () { -GtkWidget *da; +GtkWidget *box; +GtkWidget *hbox; +GtkWidget *w; +// GtkWidget *da; - if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), "FLIR One"); + if (!window) { + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (window), "FLIR One"); - g_signal_connect (window, "destroy", - G_CALLBACK (close_window), NULL); - da = gtk_drawing_area_new (); - /* set a minimum size */ - gtk_widget_set_size_request (da, 160, 120); + g_signal_connect (window, "destroy", + G_CALLBACK (close_window), NULL); - gtk_container_add (GTK_CONTAINER (window), da); + box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); + gtk_container_add (GTK_CONTAINER (window), box); - g_signal_connect (da, "draw", - G_CALLBACK (draw_event), NULL); - g_signal_connect (da,"configure-event", - G_CALLBACK (configure_event), NULL); - gtk_widget_show_all(window); - } - return window; + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); + gtk_container_add (GTK_CONTAINER (box), hbox); + + w = gtk_button_new_with_label("Start"); + gtk_container_add (GTK_CONTAINER (hbox), w); + + g_signal_connect (w, "clicked", + G_CALLBACK (start_clicked), NULL); + + w = gtk_button_new_with_label("Stop"); + gtk_container_add (GTK_CONTAINER (hbox), w); + + g_signal_connect (w, "clicked", + G_CALLBACK (stop_clicked), NULL); + + // drop down for color palettes + w = gtk_combo_box_text_new(); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "7"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "15"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "17"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "85"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "92"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "Grayscale"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "Grey"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "Iron 2"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "Iron Black"); + gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(w), NULL, "Rainbow"); + gtk_combo_box_set_active (GTK_COMBO_BOX(w), 9); + gtk_container_add (GTK_CONTAINER (hbox), w); + color_palette = palette_Rainbow; + g_signal_connect (w, "changed", + G_CALLBACK (palette_changed), NULL); + + image_darea = gtk_drawing_area_new (); + /* set a minimum size */ + gtk_widget_set_size_request (image_darea, 640, 480); + + gtk_container_add (GTK_CONTAINER (box), image_darea); + + g_signal_connect (image_darea, "draw", + G_CALLBACK (draw_event), NULL); + g_signal_connect (image_darea,"configure-event", + G_CALLBACK (configure_event), NULL); + + // g_timeout_add_seconds(1, handle_timeout, NULL); + + gtk_widget_show_all(window); + } + + return window; } -int main(int argc, char **argv) +int +main(int argc, char **argv) { - gtk_init(&argc, &argv); - do_drawingarea(); - gtk_main(); + gtk_init(&argc, &argv); + + create_main_window(); + + gtk_main(); return 0; } + diff --git a/palettes/15.h b/palettes/15.h new file mode 100644 index 0000000..d139117 --- /dev/null +++ b/palettes/15.h @@ -0,0 +1 @@ +static unsigned char palette_15[]={0x03,0x01,0x05,0x03,0x01,0x05,0x05,0x01,0x09,0x08,0x01,0x0d,0x0a,0x01,0x10,0x0c,0x01,0x14,0x0e,0x01,0x18,0x10,0x01,0x1c,0x13,0x01,0x20,0x15,0x01,0x24,0x17,0x01,0x27,0x19,0x01,0x2b,0x1b,0x01,0x2f,0x1e,0x01,0x33,0x20,0x01,0x37,0x22,0x01,0x3b,0x24,0x01,0x3e,0x26,0x01,0x41,0x28,0x01,0x45,0x2b,0x01,0x49,0x2d,0x01,0x4d,0x2f,0x01,0x51,0x31,0x01,0x54,0x33,0x01,0x58,0x36,0x01,0x5c,0x38,0x01,0x60,0x3a,0x01,0x64,0x3c,0x01,0x68,0x3e,0x01,0x6b,0x40,0x01,0x6f,0x42,0x01,0x73,0x44,0x01,0x77,0x42,0x01,0x7b,0x40,0x01,0x80,0x3f,0x01,0x84,0x3d,0x01,0x88,0x3a,0x01,0x8c,0x38,0x01,0x91,0x36,0x01,0x95,0x34,0x01,0x99,0x32,0x01,0x9d,0x30,0x01,0xa2,0x2e,0x01,0xa6,0x2c,0x01,0xaa,0x29,0x01,0xae,0x27,0x01,0xb3,0x25,0x01,0xb7,0x23,0x01,0xbb,0x21,0x01,0xbf,0x1f,0x01,0xc3,0x1d,0x01,0xc7,0x1b,0x01,0xcb,0x18,0x01,0xcf,0x16,0x01,0xd4,0x14,0x01,0xd8,0x12,0x01,0xdc,0x10,0x01,0xe0,0x0e,0x01,0xe5,0x0c,0x01,0xe9,0x0a,0x01,0xed,0x07,0x01,0xf1,0x05,0x01,0xf6,0x03,0x01,0xfa,0x01,0x01,0xfe,0x01,0x06,0xf8,0x01,0x0a,0xf3,0x01,0x0f,0xed,0x01,0x13,0xe7,0x01,0x18,0xe2,0x01,0x1c,0xdc,0x01,0x21,0xd6,0x01,0x25,0xd1,0x01,0x2a,0xcb,0x01,0x2e,0xc5,0x01,0x33,0xc0,0x01,0x37,0xbb,0x01,0x3c,0xb5,0x01,0x40,0xb0,0x01,0x44,0xaa,0x01,0x49,0xa4,0x01,0x4d,0x9f,0x01,0x52,0x99,0x01,0x56,0x93,0x01,0x5b,0x8e,0x01,0x5f,0x88,0x01,0x64,0x82,0x01,0x68,0x7d,0x01,0x6d,0x77,0x01,0x71,0x71,0x01,0x76,0x6c,0x01,0x7a,0x66,0x01,0x7f,0x60,0x01,0x83,0x5b,0x01,0x88,0x55,0x01,0x8d,0x4f,0x01,0x91,0x4a,0x01,0x96,0x44,0x01,0x9a,0x3f,0x01,0x9f,0x3a,0x01,0xa3,0x34,0x01,0xa8,0x2e,0x01,0xac,0x29,0x01,0xb1,0x23,0x01,0xb5,0x1d,0x01,0xba,0x18,0x01,0xbe,0x12,0x01,0xc2,0x0c,0x01,0xc6,0x07,0x01,0xcb,0x01,0x0a,0xcd,0x01,0x13,0xcf,0x01,0x1b,0xd0,0x01,0x24,0xd2,0x01,0x2d,0xd4,0x01,0x36,0xd6,0x01,0x3f,0xd7,0x01,0x46,0xd9,0x01,0x4f,0xdb,0x01,0x58,0xdd,0x01,0x61,0xde,0x01,0x6a,0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fe,0x82,0x01,0xfe,0x7f,0x01,0xfe,0x7d,0x01,0xfe,0x7b,0x01,0xfe,0x79,0x01,0xfe,0x77,0x01,0xfe,0x75,0x01,0xfe,0x73,0x01,0xfe,0x70,0x01,0xfe,0x6e,0x01,0xfe,0x6c,0x01,0xfe,0x6a,0x01,0xfe,0x68,0x01,0xfe,0x66,0x01,0xfe,0x63,0x01,0xfe,0x61,0x01,0xfe,0x5f,0x01,0xfe,0x5d,0x01,0xfe,0x5b,0x01,0xfe,0x59,0x01,0xfe,0x56,0x01,0xfe,0x54,0x01,0xfe,0x52,0x01,0xfe,0x50,0x01,0xfe,0x4e,0x01,0xfe,0x4c,0x01,0xfe,0x49,0x01,0xfe,0x47,0x01,0xfe,0x45,0x01,0xfe,0x43,0x01,0xfe,0x41,0x01,0xfe,0x40,0x01,0xfe,0x3e,0x01,0xfe,0x3b,0x01,0xfe,0x39,0x01,0xfe,0x37,0x01,0xfe,0x35,0x01,0xfe,0x33,0x01,0xfe,0x31,0x01,0xfe,0x2e,0x01,0xfe,0x2c,0x01,0xfe,0x2a,0x01,0xfe,0x28,0x01,0xfe,0x26,0x01,0xfe,0x24,0x01,0xfe,0x21,0x01,0xfe,0x1f,0x01,0xfe,0x1d,0x01,0xfe,0x1b,0x01,0xfe,0x19,0x01,0xfe,0x17,0x01,0xfe,0x14,0x01,0xfe,0x12,0x01,0xfe,0x10,0x01,0xfe,0x0e,0x01,0xfe,0x0c,0x01,0xfe,0x0a,0x01,0xfe,0x07,0x01,0xfe,0x05,0x01,0xfe,0x03,0x01,0xfe,0x03,0x01}; diff --git a/palettes/17.h b/palettes/17.h new file mode 100644 index 0000000..94bf0e7 --- /dev/null +++ b/palettes/17.h @@ -0,0 +1 @@ +static unsigned char palette_17[]={0x01,0x03,0x19,0x01,0x03,0x19,0x01,0x01,0x48,0x01,0x01,0x4b,0x01,0x01,0x4e,0x01,0x01,0x52,0x01,0x01,0x55,0x01,0x01,0x58,0x01,0x01,0x5c,0x01,0x01,0x5f,0x01,0x01,0x62,0x01,0x01,0x66,0x01,0x01,0x6c,0x01,0x01,0x73,0x01,0x01,0x7a,0x01,0x01,0x82,0x01,0x01,0x90,0x01,0x01,0x97,0x01,0x01,0x9e,0x01,0x01,0xa6,0x01,0x01,0xb4,0x01,0x01,0xbb,0x01,0x01,0xc1,0x01,0x01,0xc9,0x01,0x01,0xd7,0x01,0x01,0xde,0x01,0x01,0xe5,0x01,0x01,0xed,0x01,0x01,0xfb,0x06,0x01,0xf9,0x0b,0x01,0xf7,0x10,0x01,0xf5,0x19,0x01,0xef,0x1e,0x01,0xea,0x23,0x01,0xe5,0x29,0x01,0xe0,0x2e,0x01,0xdb,0x34,0x01,0xd5,0x39,0x01,0xd0,0x3f,0x01,0xcb,0x48,0x01,0xbf,0x4d,0x01,0xbc,0x52,0x01,0xb7,0x57,0x01,0xb3,0x60,0x01,0xa8,0x65,0x01,0xa4,0x6a,0x01,0x9f,0x6f,0x01,0x9b,0x78,0x01,0x90,0x7d,0x01,0x8c,0x82,0x01,0x87,0x87,0x01,0x83,0x90,0x01,0x78,0x95,0x01,0x74,0x9a,0x01,0x6f,0x9f,0x01,0x6b,0xa8,0x01,0x60,0xb1,0x01,0x5c,0xbb,0x01,0x57,0xc4,0x01,0x53,0xd7,0x01,0x48,0xd7,0x01,0x44,0xd7,0x01,0x40,0xd7,0x01,0x3c,0xd7,0x01,0x31,0xdc,0x01,0x2d,0xe1,0x01,0x28,0xe6,0x01,0x24,0xef,0x01,0x19,0xf1,0x01,0x15,0xf4,0x01,0x10,0xf6,0x01,0x0c,0xfb,0x01,0x01,0xfb,0x01,0x01,0xfb,0x01,0x01,0xfb,0x02,0x01,0xfb,0x02,0x01,0xfb,0x03,0x01,0xfa,0x05,0x01,0xfa,0x07,0x01,0xf7,0x0a,0x01,0xf7,0x0b,0x01,0xf7,0x0d,0x01,0xf7,0x0e,0x01,0xf7,0x11,0x01,0xf7,0x13,0x01,0xf6,0x15,0x01,0xf6,0x17,0x01,0xf3,0x1a,0x01,0xf3,0x1c,0x01,0xf2,0x1e,0x01,0xf2,0x20,0x01,0xef,0x23,0x01,0xef,0x25,0x01,0xee,0x27,0x01,0xee,0x29,0x01,0xeb,0x2c,0x01,0xeb,0x2d,0x01,0xeb,0x2f,0x01,0xeb,0x30,0x01,0xeb,0x33,0x01,0xeb,0x35,0x01,0xea,0x37,0x01,0xea,0x39,0x01,0xe7,0x3c,0x01,0xe7,0x3d,0x01,0xe6,0x3f,0x01,0xe6,0x40,0x01,0xe3,0x43,0x01,0xe3,0x44,0x01,0xe3,0x46,0x01,0xe3,0x47,0x01,0xe3,0x4a,0x01,0xe3,0x4c,0x01,0xe2,0x4e,0x01,0xe2,0x50,0x01,0xdf,0x53,0x01,0xdf,0x55,0x01,0xde,0x57,0x01,0xde,0x59,0x01,0xdb,0x5c,0x01,0xdb,0x5e,0x01,0xda,0x60,0x01,0xda,0x62,0x01,0xd7,0x65,0x01,0xd7,0x66,0x01,0xd7,0x68,0x01,0xd7,0x69,0x01,0xd7,0x6c,0x01,0xd7,0x6d,0x01,0xd6,0x6f,0x01,0xd6,0x71,0x01,0xd3,0x74,0x01,0xd3,0x76,0x01,0xd2,0x78,0x01,0xd2,0x7a,0x01,0xcf,0x7d,0x01,0xcf,0x7f,0x01,0xce,0x81,0x01,0xce,0x83,0x01,0xcb,0x86,0x01,0xcb,0x87,0x01,0xcb,0x89,0x01,0xcb,0x8a,0x01,0xcb,0x8d,0x01,0xcb,0x8f,0x01,0xca,0x91,0x01,0xca,0x93,0x01,0xc7,0x96,0x01,0xc7,0x98,0x01,0xc6,0x9a,0x01,0xc6,0x9c,0x01,0xc3,0x9f,0x01,0xc3,0xa0,0x01,0xc3,0xa1,0x01,0xc3,0xa3,0x01,0xc3,0xa5,0x01,0xc3,0xa7,0x01,0xc2,0xa9,0x01,0xc2,0xab,0x01,0xbf,0xae,0x01,0xbf,0xb0,0x01,0xbf,0xb2,0x01,0xbf,0xb4,0x01,0xbc,0xb7,0x01,0xbc,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e,0x91,0xd3,0xfe,0x9c,0xd5,0xfe,0xa2,0xd8,0xfe,0xa9,0xda,0xfe,0xaf,0xdf,0xfe,0xbc,0xe2,0xfe,0xc1,0xe5,0xfe,0xc8,0xe9,0xfe,0xce,0xef,0xfe,0xdb,0xf1,0xfe,0xe1,0xf4,0xfe,0xe8,0xf6,0xfe,0xee,0xfb,0xfe,0xfb,0xfc,0xfe,0xfc,0xfd,0xfe,0xfd,0xfd,0xfe,0xfd}; diff --git a/palettes/7.h b/palettes/7.h new file mode 100644 index 0000000..eff42c9 --- /dev/null +++ b/palettes/7.h @@ -0,0 +1 @@ +static unsigned char palette_7[]={0xfe,0x01,0x01,0xfe,0x01,0x01,0x01,0xfe,0x01,0x01,0x01,0xfe,0xfe,0xfe,0x01,0x01,0xfe,0xfe,0xfe,0x01,0xfe,0xf7,0xf7,0xf7,0xf6,0xf6,0xf6,0xf5,0xf5,0xf5,0xf4,0xf4,0xf4,0xf3,0xf3,0xf3,0xf2,0xf2,0xf2,0xf1,0xf1,0xf1,0xf0,0xf0,0xf0,0xef,0xef,0xef,0xee,0xee,0xee,0xed,0xed,0xed,0xec,0xec,0xec,0xeb,0xeb,0xeb,0xea,0xea,0xea,0xe9,0xe9,0xe9,0xe8,0xe8,0xe8,0xe7,0xe7,0xe7,0xe6,0xe6,0xe6,0xe5,0xe5,0xe5,0xe4,0xe4,0xe4,0xe3,0xe3,0xe3,0xe2,0xe2,0xe2,0xe1,0xe1,0xe1,0xe0,0xe0,0xe0,0xdf,0xdf,0xdf,0xde,0xde,0xde,0xdd,0xdd,0xdd,0xdc,0xdc,0xdc,0xdb,0xdb,0xdb,0xda,0xda,0xda,0xd9,0xd9,0xd9,0xd8,0xd8,0xd8,0xd7,0xd7,0xd7,0xd6,0xd6,0xd6,0xd5,0xd5,0xd5,0xd4,0xd4,0xd4,0xd3,0xd3,0xd3,0xd2,0xd2,0xd2,0xd1,0xd1,0xd1,0xd0,0xd0,0xd0,0xcf,0xcf,0xcf,0xce,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x87,0x87,0x86,0x86,0x86,0x85,0x85,0x85,0x84,0x84,0x84,0x83,0x83,0x83,0x82,0x82,0x82,0x81,0x81,0x81,0x80,0x80,0x80,0x7f,0x7f,0x7f,0x7e,0x7e,0x7e,0x7d,0x7d,0x7d,0x7c,0x7c,0x7c,0x7b,0x7b,0x7b,0x7a,0x7a,0x7a,0x79,0x79,0x79,0x78,0x78,0x78,0x77,0x77,0x77,0x76,0x76,0x76,0x75,0x75,0x75,0x74,0x74,0x74,0x73,0x73,0x73,0x72,0x72,0x72,0x71,0x71,0x71,0x70,0x70,0x70,0x6f,0x6f,0x6f,0x6e,0x6e,0x6e,0x6d,0x6d,0x6d,0x6c,0x6c,0x6c,0x6b,0x6b,0x6b,0x6a,0x6a,0x6a,0x69,0x69,0x69,0x68,0x68,0x68,0x67,0x67,0x67,0x66,0x66,0x66,0x65,0x65,0x65,0x64,0x64,0x64,0x63,0x63,0x63,0x62,0x62,0x62,0x61,0x61,0x61,0x60,0x60,0x60,0x5f,0x5f,0x5f,0x5e,0x5e,0x5e,0x5d,0x5d,0x5d,0x5c,0x5c,0x5c,0x5b,0x5b,0x5b,0x5a,0x5a,0x5a,0x59,0x59,0x59,0x58,0x58,0x58,0x57,0x57,0x57,0x56,0x56,0x56,0x55,0x55,0x55,0x54,0x54,0x54,0x53,0x53,0x53,0x52,0x52,0x52,0x51,0x51,0x51,0x50,0x50,0x50,0x4f,0x4f,0x4f,0x4e,0x4e,0x4e,0x4d,0x4d,0x4d,0x4c,0x4c,0x4c,0x4b,0x4b,0x4b,0x4a,0x4a,0x4a,0x49,0x49,0x49,0x48,0x48,0x48,0x47,0x47,0x47,0x46,0x46,0x46,0x45,0x45,0x45,0x44,0x44,0x44,0x43,0x43,0x43,0x42,0x42,0x42,0x41,0x41,0x41,0x40,0x40,0x40,0x40,0x40,0x40,0x3f,0x3f,0x3f,0x3e,0x3e,0x3e,0x3d,0x3d,0x3d,0x3c,0x3c,0x3c,0x3b,0x3b,0x3b,0x3a,0x3a,0x3a,0x39,0x39,0x39,0x38,0x38,0x38,0x37,0x37,0x37,0x36,0x36,0x36,0x35,0x35,0x35,0x34,0x34,0x34,0x33,0x33,0x33,0x32,0x32,0x32,0x31,0x31,0x31,0x30,0x30,0x30,0x2f,0x2f,0x2f,0x2e,0x2e,0x2e,0x2d,0x2d,0x2d,0x2c,0x2c,0x2c,0x2b,0x2b,0x2b,0x2a,0x2a,0x2a,0x29,0x29,0x29,0x28,0x28,0x28,0x27,0x27,0x27,0x26,0x26,0x26,0x25,0x25,0x25,0x24,0x24,0x24,0x23,0x23,0x23,0x22,0x22,0x22,0x21,0x21,0x21,0x20,0x20,0x20,0x1f,0x1f,0x1f,0x1e,0x1e,0x1e,0x1d,0x1d,0x1d,0x1c,0x1c,0x1c,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x19,0x19,0x19,0x18,0x18,0x18,0x17,0x17,0x17,0x16,0x16,0x16,0x15,0x15,0x15,0x14,0x14,0x14,0x13,0x13,0x13,0x12,0x12,0x12,0x11,0x11,0x11,0x10,0x10,0x10,0x0f,0x0f,0x0f,0x0e,0x0e,0x0e,0x0d,0x0d,0x0d,0x0c,0x0c,0x0c,0x0b,0x0b,0x0b,0x0a,0x0a,0x0a,0x09,0x09,0x09,0x08,0x08,0x08,0x07,0x07,0x07,0x06,0x06,0x06,0x05,0x05,0x05,0x04,0x04,0x04,0x03,0x03,0x03,0x02,0x02,0x02,0x02,0x02,0x02}; diff --git a/palettes/85.h b/palettes/85.h new file mode 100644 index 0000000..777ba79 --- /dev/null +++ b/palettes/85.h @@ -0,0 +1 @@ +static unsigned char palette_85[]={0xff,0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xf7,0xff,0xff,0xf3,0xff,0xff,0xef,0xff,0xff,0xec,0xff,0xff,0xe8,0xff,0xff,0xe4,0xff,0xff,0xe0,0xff,0xff,0xd9,0xff,0xff,0xd1,0xff,0xff,0xca,0xff,0xff,0xc2,0xff,0xff,0xba,0xff,0xff,0xb3,0xff,0xff,0xab,0xff,0xff,0xa3,0xff,0xff,0x9c,0xff,0xff,0x94,0xff,0xff,0x8d,0xff,0xff,0x85,0xff,0xff,0x7e,0xff,0xff,0x76,0xff,0xff,0x6f,0xff,0xff,0x67,0xff,0xff,0x60,0xff,0xfe,0x58,0xff,0xfd,0x50,0xff,0xfc,0x49,0xff,0xfb,0x41,0xff,0xfa,0x39,0xff,0xfa,0x32,0xff,0xf9,0x2a,0xff,0xf8,0x23,0xff,0xf6,0x1e,0xff,0xf4,0x1a,0xff,0xf3,0x16,0xff,0xf1,0x12,0xff,0xef,0x0d,0xff,0xee,0x09,0xff,0xec,0x05,0xff,0xea,0x01,0xff,0xe8,0x00,0xff,0xe7,0x00,0xff,0xe5,0x00,0xff,0xe3,0x00,0xff,0xe1,0x00,0xff,0xdf,0x00,0xff,0xdd,0x00,0xff,0xdc,0x00,0xff,0xda,0x00,0xff,0xd8,0x00,0xff,0xd6,0x00,0xff,0xd5,0x00,0xff,0xd3,0x00,0xff,0xd1,0x00,0xff,0xd0,0x00,0xff,0xce,0x00,0xff,0xcc,0x00,0xff,0xca,0x00,0xff,0xc9,0x00,0xff,0xc7,0x00,0xff,0xc5,0x00,0xff,0xc3,0x00,0xff,0xc1,0x00,0xff,0xbf,0x00,0xff,0xbe,0x00,0xff,0xbc,0x00,0xff,0xba,0x00,0xff,0xb8,0x00,0xff,0xb6,0x00,0xff,0xb5,0x00,0xff,0xb3,0x00,0xff,0xb1,0x00,0xff,0xaf,0x00,0xff,0xad,0x00,0xff,0xac,0x00,0xff,0xaa,0x00,0xff,0xa8,0x00,0xff,0xa7,0x00,0xff,0xa5,0x00,0xff,0xa3,0x00,0xff,0xa1,0x00,0xff,0xa0,0x00,0xff,0x9e,0x00,0xff,0x9c,0x00,0xff,0x9b,0x00,0xff,0x99,0x00,0xff,0x97,0x00,0xff,0x96,0x00,0xff,0x94,0x00,0xff,0x92,0x00,0xff,0x90,0x00,0xff,0x8f,0x00,0xff,0x8d,0x00,0xff,0x8b,0x00,0xff,0x8a,0x00,0xff,0x88,0x00,0xff,0x86,0x00,0xff,0x84,0x00,0xff,0x82,0x00,0xff,0x81,0x00,0xff,0x7f,0x00,0xff,0x7d,0x00,0xff,0x7b,0x00,0xff,0x79,0x00,0xff,0x77,0x00,0xff,0x75,0x00,0xff,0x73,0x00,0xfe,0x71,0x00,0xfe,0x6f,0x00,0xfe,0x6d,0x00,0xfd,0x6b,0x00,0xfd,0x69,0x00,0xfc,0x67,0x00,0xfc,0x65,0x00,0xfb,0x63,0x00,0xf9,0x60,0x00,0xf8,0x5d,0x00,0xf6,0x5b,0x00,0xf5,0x58,0x00,0xf3,0x55,0x00,0xf2,0x53,0x00,0xf1,0x50,0x00,0xef,0x4d,0x00,0xee,0x4b,0x01,0xed,0x48,0x02,0xeb,0x45,0x02,0xea,0x43,0x03,0xe8,0x40,0x03,0xe7,0x3d,0x04,0xe6,0x3b,0x05,0xe4,0x38,0x06,0xe3,0x35,0x0a,0xe2,0x33,0x0e,0xe0,0x30,0x11,0xdf,0x2d,0x15,0xdd,0x2b,0x19,0xdc,0x28,0x1c,0xda,0x25,0x20,0xd9,0x23,0x24,0xd8,0x20,0x27,0xd6,0x1d,0x2b,0xd5,0x1b,0x2e,0xd4,0x18,0x32,0xd3,0x16,0x35,0xd2,0x13,0x39,0xd0,0x11,0x3c,0xcf,0x0e,0x40,0xce,0x0c,0x43,0xcc,0x0b,0x47,0xcb,0x09,0x4a,0xc9,0x07,0x4e,0xc8,0x06,0x51,0xc6,0x04,0x55,0xc5,0x02,0x58,0xc3,0x00,0x5c,0xc2,0x00,0x60,0xc1,0x00,0x63,0xbf,0x00,0x67,0xbe,0x00,0x6a,0xbd,0x00,0x6e,0xbb,0x00,0x71,0xba,0x00,0x75,0xb9,0x00,0x78,0xb7,0x00,0x7c,0xb6,0x00,0x7f,0xb5,0x00,0x83,0xb3,0x00,0x86,0xb2,0x00,0x8a,0xb1,0x00,0x8d,0xaf,0x00,0x91,0xae,0x00,0x94,0xad,0x00,0x98,0xab,0x00,0x9c,0xaa,0x00,0x9f,0xa9,0x00,0xa3,0xa7,0x00,0xa7,0xa6,0x00,0xaa,0xa5,0x00,0xae,0xa3,0x00,0xb1,0xa2,0x00,0xb5,0xa0,0x00,0xb9,0x9e,0x00,0xbc,0x9c,0x00,0xc0,0x9a,0x00,0xc3,0x98,0x00,0xc7,0x96,0x00,0xca,0x94,0x00,0xce,0x92,0x00,0xd1,0x90,0x00,0xd4,0x8d,0x00,0xd6,0x8a,0x00,0xd8,0x87,0x00,0xda,0x84,0x00,0xdc,0x81,0x00,0xde,0x7e,0x00,0xe0,0x7b,0x00,0xe2,0x78,0x00,0xe3,0x75,0x00,0xe2,0x72,0x00,0xe1,0x70,0x00,0xe0,0x6d,0x00,0xdf,0x6a,0x00,0xde,0x67,0x00,0xdd,0x64,0x00,0xdd,0x61,0x00,0xdb,0x5e,0x00,0xd7,0x5b,0x00,0xd4,0x58,0x00,0xd1,0x55,0x00,0xcd,0x52,0x00,0xca,0x4f,0x00,0xc6,0x4c,0x00,0xc3,0x49,0x00,0xc0,0x46,0x00,0xbc,0x43,0x00,0xb9,0x40,0x00,0xb6,0x3d,0x00,0xb2,0x3a,0x00,0xaf,0x37,0x00,0xac,0x34,0x00,0xa9,0x31,0x00,0xa5,0x2e,0x00,0xa1,0x2b,0x00,0x9d,0x29,0x00,0x99,0x26,0x00,0x94,0x23,0x00,0x90,0x20,0x00,0x8c,0x1d,0x00,0x88,0x1a,0x00,0x83,0x17,0x00,0x7f,0x14,0x00,0x7b,0x11,0x00,0x77,0x0e,0x00,0x73,0x0b,0x00,0x6f,0x08,0x00,0x6b,0x06,0x00,0x66,0x03,0x00,0x62,0x01,0x00,0x5e,0x01,0x00,0x5a,0x01,0x00,0x56,0x01,0x00,0x51,0x00,0x00,0x4d,0x00,0x00,0x49,0x00,0x00,0x45,0x00,0x00,0x40,0x00,0x00,0x3b,0x00,0x00,0x34,0x00,0x00,0x2c,0x00,0x00,0x25,0x00,0x00,0x1e,0x00,0x00,0x16,0x00,0x00,0x0f,0x00,0x00,0x07,0x00,0x00,0x00}; diff --git a/palettes/92.h b/palettes/92.h new file mode 100644 index 0000000..5214f8d --- /dev/null +++ b/palettes/92.h @@ -0,0 +1 @@ +static unsigned char palette_92[]={0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x01,0x01,0x02,0x01,0x01,0x03,0x01,0x01,0x04,0x01,0x01,0x05,0x01,0x01,0x06,0x01,0x01,0x07,0x01,0x01,0x09,0x01,0x01,0x0b,0x01,0x01,0x0d,0x01,0x01,0x0f,0x01,0x01,0x11,0x01,0x01,0x13,0x02,0x01,0x16,0x02,0x01,0x18,0x02,0x01,0x1b,0x02,0x01,0x1e,0x02,0x01,0x21,0x02,0x01,0x24,0x02,0x01,0x28,0x02,0x01,0x2b,0x03,0x01,0x2f,0x03,0x01,0x33,0x03,0x01,0x37,0x03,0x02,0x3b,0x04,0x02,0x40,0x04,0x02,0x43,0x04,0x02,0x48,0x05,0x02,0x4d,0x05,0x02,0x59,0x05,0x02,0x5f,0x06,0x02,0x65,0x06,0x02,0x6b,0x07,0x02,0x71,0x07,0x02,0x76,0x08,0x03,0x7c,0x08,0x03,0x81,0x09,0x03,0x86,0x09,0x03,0x8b,0x0a,0x03,0x8f,0x0b,0x03,0x94,0x0b,0x03,0x98,0x0c,0x04,0x9c,0x0d,0x04,0x9f,0x0e,0x04,0xa3,0x0f,0x04,0xa6,0x0f,0x01,0xa9,0x10,0x01,0xac,0x11,0x01,0xaf,0x12,0x01,0xb1,0x13,0x01,0xb4,0x14,0x01,0xb6,0x15,0x01,0xb8,0x17,0x01,0xba,0x18,0x01,0xbb,0x19,0x01,0xbc,0x1a,0x01,0xbd,0x1c,0x01,0xbe,0x1d,0x02,0xbf,0x1e,0x03,0xbf,0x20,0x04,0xbf,0x21,0x01,0xbf,0x23,0x01,0xbf,0x24,0x01,0xbf,0x26,0x01,0xbe,0x28,0x01,0xbd,0x29,0x01,0xbc,0x2b,0x02,0xbb,0x2d,0x02,0xb9,0x2f,0x02,0xb8,0x31,0x02,0xb6,0x33,0x03,0xb4,0x35,0x03,0xb1,0x37,0x03,0xaf,0x39,0x04,0xac,0x3b,0x04,0xa9,0x3e,0x05,0xa5,0x40,0x05,0xa2,0x41,0x06,0x9e,0x44,0x07,0x9a,0x46,0x07,0x96,0x49,0x08,0x91,0x4c,0x09,0x8d,0x4e,0x09,0x88,0x51,0x0a,0x82,0x54,0x0b,0x7d,0x57,0x0c,0x77,0x5a,0x0d,0x72,0x5d,0x0e,0x6c,0x60,0x0f,0x55,0x63,0x10,0x4e,0x66,0x11,0x48,0x69,0x12,0x42,0x6d,0x13,0x3e,0x70,0x14,0x39,0x74,0x15,0x34,0x77,0x16,0x2f,0x7b,0x17,0x2b,0x7f,0x19,0x27,0x83,0x1a,0x23,0x86,0x1b,0x1f,0x8a,0x1d,0x1c,0x8e,0x1e,0x19,0x92,0x20,0x16,0x97,0x21,0x14,0x9b,0x22,0x11,0x9b,0x24,0x0f,0xa0,0x26,0x0d,0xa4,0x27,0x0c,0xa8,0x29,0x0a,0xac,0x2b,0x09,0xb0,0x2c,0x07,0xb4,0x2e,0x06,0xb8,0x30,0x05,0xbb,0x32,0x04,0xbf,0x33,0x04,0xc1,0x35,0x03,0xc4,0x37,0x03,0xc7,0x39,0x02,0xca,0x3b,0x02,0xcd,0x3d,0x02,0xd0,0x3f,0x01,0xd3,0x40,0x01,0xd5,0x42,0x01,0xd8,0x45,0x01,0xda,0x47,0x01,0xdc,0x49,0x01,0xde,0x4b,0x01,0xe0,0x4e,0x01,0xe2,0x50,0x01,0xe4,0x52,0x01,0xe6,0x55,0x01,0xe8,0x57,0x01,0xe9,0x5a,0x01,0xeb,0x5c,0x01,0xec,0x5f,0x01,0xee,0x61,0x01,0xef,0x64,0x01,0xf0,0x67,0x01,0xf2,0x69,0x02,0xf3,0x6c,0x02,0xf4,0x6f,0x02,0xf5,0x71,0x02,0xf6,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,0xfe,0xfe,0x8e,0xfe,0xfe,0x93,0xfe,0xfe,0x98,0xfe,0xfe,0x9d,0xfe,0xfe,0xa2,0xfe,0xfe,0xa5,0xfe,0xfe,0xab,0xfe,0xfe,0xb0,0xfe,0xfe,0xb6,0xfe,0xfe,0xbb,0xfe,0xfe,0xbf,0xfe,0xfe,0xc3,0xfe,0xfe,0xc8,0xfe,0xfe,0xcc,0xfe,0xfe,0xd1,0xfe,0xfe,0xd5,0xfe,0xfe,0xd9,0xfe,0xfe,0xdc,0xfe,0xfe,0xe0,0xfe,0xfe,0xe3,0xfe,0xfe,0xe6,0xfe,0xfe,0xe9,0xfe,0xfe,0xec,0xfe,0xfe,0xee,0xfe,0xfe,0xf1,0xfe,0xfe,0xf3,0xfe,0xfe,0xf5,0xfe,0xfe,0xf6,0xfe,0xfe,0xf8,0xfe,0xfe,0xf9,0xfe,0xfe,0xfb,0xfe,0xfe,0xfc,0xfe,0xfe,0xfd,0xfe,0xfe,0xfd,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}; diff --git a/palettes/Grayscale.h b/palettes/Grayscale.h new file mode 100644 index 0000000..b229e1d --- /dev/null +++ b/palettes/Grayscale.h @@ -0,0 +1 @@ +static unsigned char palette_Grayscale[]={0x00,0x00,0x00,0x01,0x01,0x01,0x02,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08,0x08,0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d,0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10,0x11,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18,0x18,0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x20,0x20,0x20,0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x23,0x24,0x24,0x24,0x25,0x25,0x25,0x26,0x26,0x26,0x27,0x27,0x27,0x28,0x28,0x28,0x29,0x29,0x29,0x2a,0x2a,0x2a,0x2b,0x2b,0x2b,0x2c,0x2c,0x2c,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,0x2f,0x2f,0x2f,0x30,0x30,0x30,0x31,0x31,0x31,0x32,0x32,0x32,0x33,0x33,0x33,0x34,0x34,0x34,0x35,0x35,0x35,0x36,0x36,0x36,0x37,0x37,0x37,0x38,0x38,0x38,0x39,0x39,0x39,0x3a,0x3a,0x3a,0x3b,0x3b,0x3b,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,0x3e,0x3e,0x3f,0x3f,0x3f,0x40,0x40,0x40,0x41,0x41,0x41,0x42,0x42,0x42,0x43,0x43,0x43,0x44,0x44,0x44,0x45,0x45,0x45,0x46,0x46,0x46,0x47,0x47,0x47,0x48,0x48,0x48,0x49,0x49,0x49,0x4a,0x4a,0x4a,0x4b,0x4b,0x4b,0x4c,0x4c,0x4c,0x4d,0x4d,0x4d,0x4e,0x4e,0x4e,0x4f,0x4f,0x4f,0x50,0x50,0x50,0x51,0x51,0x51,0x52,0x52,0x52,0x53,0x53,0x53,0x54,0x54,0x54,0x55,0x55,0x55,0x56,0x56,0x56,0x57,0x57,0x57,0x58,0x58,0x58,0x59,0x59,0x59,0x5a,0x5a,0x5a,0x5b,0x5b,0x5b,0x5c,0x5c,0x5c,0x5d,0x5d,0x5d,0x5e,0x5e,0x5e,0x5f,0x5f,0x5f,0x60,0x60,0x60,0x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63,0x63,0x64,0x64,0x64,0x65,0x65,0x65,0x66,0x66,0x66,0x67,0x67,0x67,0x68,0x68,0x68,0x69,0x69,0x69,0x6a,0x6a,0x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fc,0xfc,0xfc,0xfd,0xfd,0xfd,0xfe,0xfe,0xfe,0xff,0xff,0xff}; diff --git a/palettes/Grey.h b/palettes/Grey.h new file mode 100644 index 0000000..12642f2 --- /dev/null +++ b/palettes/Grey.h @@ -0,0 +1 @@ +static unsigned char palette_Grey[]={0x00,0x00,0x00,0x01,0x01,0x01,0x02,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08,0x08,0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d,0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10,0x11,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18,0x18,0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x20,0x20,0x20,0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x23,0x24,0x24,0x24,0x25,0x25,0x25,0x26,0x26,0x26,0x27,0x27,0x27,0x28,0x28,0x28,0x29,0x29,0x29,0x2a,0x2a,0x2a,0x2b,0x2b,0x2b,0x2c,0x2c,0x2c,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,0x2f,0x2f,0x2f,0x30,0x30,0x30,0x31,0x31,0x31,0x32,0x32,0x32,0x33,0x33,0x33,0x34,0x34,0x34,0x35,0x35,0x35,0x36,0x36,0x36,0x37,0x37,0x37,0x38,0x38,0x38,0x39,0x39,0x39,0x3a,0x3a,0x3a,0x3b,0x3b,0x3b,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,0x3e,0x3e,0x3f,0x3f,0x3f,0x40,0x40,0x40,0x41,0x41,0x41,0x42,0x42,0x42,0x43,0x43,0x43,0x44,0x44,0x44,0x45,0x45,0x45,0x46,0x46,0x46,0x47,0x47,0x47,0x48,0x48,0x48,0x49,0x49,0x49,0x4a,0x4a,0x4a,0x4b,0x4b,0x4b,0x4c,0x4c,0x4c,0x4d,0x4d,0x4d,0x4e,0x4e,0x4e,0x4f,0x4f,0x4f,0x50,0x50,0x50,0x51,0x51,0x51,0x52,0x52,0x52,0x53,0x53,0x53,0x54,0x54,0x54,0x55,0x55,0x55,0x56,0x56,0x56,0x57,0x57,0x57,0x58,0x58,0x58,0x59,0x59,0x59,0x5a,0x5a,0x5a,0x5b,0x5b,0x5b,0x5c,0x5c,0x5c,0x5d,0x5d,0x5d,0x5e,0x5e,0x5e,0x5f,0x5f,0x5f,0x60,0x60,0x60,0x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63,0x63,0x64,0x64,0x64,0x65,0x65,0x65,0x66,0x66,0x66,0x67,0x67,0x67,0x68,0x68,0x68,0x69,0x69,0x69,0x6a,0x6a,0x6a,0x6b,0x6b,0x6b,0x6c,0x6c,0x6c,0x6d,0x6d,0x6d,0x6e,0x6e,0x6e,0x6f,0x6f,0x6f,0x70,0x70,0x70,0x71,0x71,0x71,0x72,0x72,0x72,0x73,0x73,0x73,0x74,0x74,0x74,0x75,0x75,0x75,0x76,0x76,0x76,0x77,0x77,0x77,0x78,0x78,0x78,0x79,0x79,0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7b,0x7c,0x7c,0x7c,0x7d,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80,0x81,0x81,0x81,0x82,0x82,0x82,0x83,0x83,0x83,0x84,0x84,0x84,0x85,0x85,0x85,0x86,0x86,0x86,0x87,0x87,0x87,0x88,0x88,0x88,0x89,0x89,0x89,0x8a,0x8a,0x8a,0x8b,0x8b,0x8b,0x8c,0x8c,0x8c,0x8d,0x8d,0x8d,0x8e,0x8e,0x8e,0x8f,0x8f,0x8f,0x90,0x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xd8,0xd8,0xd8,0xd9,0xd9,0xd9,0xda,0xda,0xda,0xdb,0xdb,0xdb,0xdc,0xdc,0xdc,0xdd,0xdd,0xdd,0xde,0xde,0xde,0xdf,0xdf,0xdf,0xe0,0xe0,0xe0,0xe1,0xe1,0xe1,0xe2,0xe2,0xe2,0xe3,0xe3,0xe3,0xe4,0xe4,0xe4,0xe5,0xe5,0xe5,0xe6,0xe6,0xe6,0xe7,0xe7,0xe7,0xe8,0xe8,0xe8,0xe9,0xe9,0xe9,0xea,0xea,0xea,0xeb,0xeb,0xeb,0xec,0xec,0xec,0xed,0xed,0xed,0xee,0xee,0xee,0xef,0xef,0xef,0xf0,0xf0,0xf0,0xf1,0xf1,0xf1,0xf2,0xf2,0xf2,0xf3,0xf3,0xf3,0xf4,0xf4,0xf4,0xf5,0xf5,0xf5,0xf6,0xf6,0xf6,0xf7,0xf7,0xf7,0xf8,0xf8,0xf8,0xf9,0xf9,0xf9,0xfa,0xfa,0xfa,0xfb,0xfb,0xfb,0xfc,0xfc,0xfc,0xfd,0xfd,0xfd,0xfe,0xfe,0xfe,0xff,0xff,0xff}; diff --git a/palettes/Iron2.h b/palettes/Iron2.h new file mode 100644 index 0000000..012a552 --- /dev/null +++ b/palettes/Iron2.h @@ -0,0 +1 @@ +static unsigned char palette_Iron2[]={0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x18,0x00,0x00,0x26,0x00,0x00,0x2e,0x00,0x00,0x34,0x00,0x00,0x3b,0x00,0x00,0x42,0x00,0x00,0x49,0x00,0x00,0x50,0x01,0x00,0x55,0x02,0x00,0x59,0x03,0x00,0x5d,0x04,0x00,0x61,0x05,0x00,0x65,0x06,0x00,0x68,0x08,0x00,0x6c,0x0a,0x00,0x70,0x0b,0x00,0x74,0x0d,0x00,0x76,0x0f,0x00,0x77,0x11,0x00,0x79,0x14,0x00,0x7b,0x18,0x00,0x7e,0x1b,0x00,0x80,0x1e,0x00,0x82,0x21,0x00,0x85,0x24,0x00,0x87,0x28,0x00,0x88,0x2b,0x00,0x8a,0x2f,0x00,0x8b,0x32,0x00,0x8d,0x35,0x00,0x8e,0x38,0x00,0x90,0x3b,0x00,0x91,0x3e,0x00,0x92,0x40,0x00,0x94,0x42,0x00,0x95,0x45,0x00,0x96,0x48,0x00,0x96,0x4b,0x00,0x96,0x4e,0x00,0x97,0x51,0x00,0x97,0x53,0x00,0x98,0x57,0x00,0x98,0x5a,0x00,0x99,0x5d,0x00,0x9a,0x60,0x00,0x9b,0x63,0x00,0x9b,0x66,0x00,0x9b,0x69,0x00,0x9b,0x6c,0x00,0x9c,0x6f,0x00,0x9c,0x71,0x00,0x9d,0x73,0x00,0x9d,0x77,0x00,0x9d,0x7a,0x00,0x9d,0x7d,0x00,0x9d,0x80,0x00,0x9d,0x82,0x00,0x9d,0x85,0x00,0x9d,0x88,0x00,0x9d,0x8a,0x00,0x9d,0x8d,0x00,0x9d,0x90,0x00,0x9c,0x93,0x00,0x9c,0x96,0x00,0x9b,0x99,0x00,0x9b,0x9b,0x00,0x9b,0x9d,0x00,0x9b,0xa0,0x00,0x9b,0xa2,0x00,0x9b,0xa4,0x00,0x9b,0xa7,0x00,0x9a,0xa9,0x00,0x9a,0xab,0x00,0x99,0xac,0x00,0x99,0xae,0x01,0x98,0xb0,0x01,0x98,0xb1,0x01,0x97,0xb3,0x01,0x97,0xb5,0x02,0x96,0xb7,0x02,0x95,0xb8,0x03,0x95,0xb9,0x04,0x95,0xbb,0x05,0x94,0xbc,0x05,0x93,0xbe,0x05,0x92,0xbf,0x06,0x92,0xc0,0x07,0x91,0xc1,0x08,0x90,0xc2,0x09,0x8f,0xc3,0x0b,0x8e,0xc4,0x0c,0x8d,0xc5,0x0d,0x8c,0xc7,0x0e,0x8a,0xc8,0x10,0x88,0xc9,0x12,0x86,0xca,0x13,0x85,0xcb,0x14,0x83,0xcd,0x16,0x81,0xce,0x17,0x7f,0xcf,0x19,0x7c,0xd0,0x1a,0x79,0xd1,0x1b,0x77,0xd2,0x1d,0x74,0xd3,0x1f,0x72,0xd4,0x21,0x70,0xd5,0x22,0x6c,0xd6,0x24,0x68,0xd7,0x26,0x65,0xd8,0x28,0x62,0xd9,0x2a,0x5f,0xda,0x2d,0x5c,0xdb,0x2f,0x57,0xdc,0x30,0x52,0xdd,0x31,0x4d,0xde,0x33,0x47,0xdf,0x35,0x41,0xe0,0x37,0x3c,0xe0,0x38,0x36,0xe1,0x3a,0x31,0xe2,0x3c,0x2b,0xe3,0x3e,0x25,0xe4,0x3f,0x20,0xe4,0x41,0x1c,0xe5,0x43,0x1a,0xe6,0x45,0x18,0xe6,0x47,0x15,0xe7,0x49,0x13,0xe8,0x4b,0x11,0xe8,0x4c,0x0f,0xe9,0x4d,0x0d,0xea,0x4e,0x0c,0xeb,0x50,0x0b,0xeb,0x52,0x0a,0xeb,0x54,0x09,0xec,0x56,0x08,0xec,0x58,0x08,0xed,0x5a,0x07,0xed,0x5b,0x06,0xee,0x5c,0x05,0xee,0x5e,0x05,0xef,0x5f,0x04,0xef,0x61,0x04,0xf0,0x63,0x03,0xf0,0x65,0x03,0xf1,0x66,0x03,0xf1,0x67,0x03,0xf1,0x69,0x02,0xf1,0x6a,0x02,0xf1,0x6c,0x01,0xf2,0x6d,0x01,0xf2,0x6f,0x01,0xf3,0x71,0x01,0xf3,0x72,0x01,0xf4,0x74,0x00,0xf4,0x75,0x00,0xf4,0x77,0x00,0xf4,0x79,0x00,0xf5,0x7c,0x00,0xf5,0x7e,0x00,0xf6,0x80,0x00,0xf6,0x82,0x00,0xf7,0x83,0x00,0xf7,0x85,0x00,0xf8,0x87,0x00,0xf8,0x88,0x00,0xf8,0x89,0x00,0xf8,0x8b,0x00,0xf8,0x8c,0x00,0xf9,0x8e,0x00,0xf9,0x8f,0x00,0xf9,0x90,0x00,0xf9,0x92,0x00,0xfa,0x94,0x00,0xfa,0x96,0x00,0xfb,0x98,0x00,0xfb,0x9b,0x00,0xfc,0x9d,0x00,0xfc,0x9f,0x00,0xfd,0xa1,0x00,0xfd,0xa3,0x00,0xfd,0xa6,0x00,0xfd,0xa8,0x00,0xfd,0xaa,0x00,0xfd,0xac,0x00,0xfd,0xae,0x00,0xfe,0xaf,0x00,0xfe,0xb1,0x00,0xfe,0xb2,0x00,0xfe,0xb4,0x00,0xfe,0xb7,0x00,0xfe,0xb9,0x00,0xfe,0xba,0x00,0xfe,0xbc,0x00,0xfe,0xbd,0x00,0xfe,0xbf,0x00,0xfe,0xc1,0x00,0xfe,0xc3,0x00,0xfe,0xc5,0x00,0xfe,0xc7,0x00,0xfe,0xc8,0x00,0xfe,0xca,0x01,0xfe,0xcb,0x01,0xfe,0xcc,0x02,0xfe,0xce,0x03,0xfe,0xcf,0x04,0xfe,0xd1,0x06,0xfe,0xd3,0x08,0xfe,0xd5,0x0a,0xfe,0xd7,0x0b,0xfe,0xd8,0x0c,0xff,0xda,0x0e,0xff,0xdb,0x10,0xff,0xdc,0x13,0xff,0xdd,0x17,0xff,0xde,0x1b,0xff,0xe0,0x1f,0xff,0xe1,0x23,0xff,0xe3,0x26,0xff,0xe4,0x2a,0xff,0xe5,0x30,0xff,0xe6,0x35,0xff,0xe7,0x3c,0xff,0xe9,0x41,0xff,0xea,0x47,0xff,0xeb,0x4d,0xff,0xed,0x53,0xff,0xee,0x59,0xff,0xef,0x60,0xff,0xef,0x66,0xff,0xf0,0x6d,0xff,0xf1,0x73,0xff,0xf1,0x7c,0xff,0xf2,0x84,0xff,0xf3,0x8b,0xff,0xf4,0x92,0xff,0xf4,0x99,0xff,0xf5,0xa0,0xff,0xf5,0xa8,0xff,0xf6,0xaf,0xff,0xf7,0xb5,0xff,0xf8,0xbb,0xff,0xf8,0xc1,0xff,0xf9,0xc6,0xff,0xf9,0xcc,0xff,0xfa,0xd2,0xff,0xfb,0xd8,0xff,0xfc,0xde,0xff,0xfd,0xe3,0xff,0xfd,0xe8,0xff,0xfe,0xed,0xff,0xfe,0xf3,0xff,0xff,0xf7,0xff,0xff,0xf9}; diff --git a/palettes/Iron_Black.h b/palettes/Iron_Black.h new file mode 100644 index 0000000..044be41 --- /dev/null +++ b/palettes/Iron_Black.h @@ -0,0 +1 @@ +static unsigned char palette_Iron_Black[]={0xff,0xff,0xff,0xfd,0xfd,0xfd,0xfb,0xfb,0xfb,0xf9,0xf9,0xf9,0xf7,0xf7,0xf7,0xf5,0xf5,0xf5,0xf3,0xf3,0xf3,0xf1,0xf1,0xf1,0xef,0xef,0xef,0xed,0xed,0xed,0xeb,0xeb,0xeb,0xe9,0xe9,0xe9,0xe7,0xe7,0xe7,0xe5,0xe5,0xe5,0xe3,0xe3,0xe3,0xe1,0xe1,0xe1,0xdf,0xdf,0xdf,0xdd,0xdd,0xdd,0xdb,0xdb,0xdb,0xd9,0xd9,0xd9,0xd7,0xd7,0xd7,0xd5,0xd5,0xd5,0xd3,0xd3,0xd3,0xd1,0xd1,0xd1,0xcf,0xcf,0xcf,0xcd,0xcd,0xcd,0xcb,0xcb,0xcb,0xc9,0xc9,0xc9,0xc7,0xc7,0xc7,0xc5,0xc5,0xc5,0xc3,0xc3,0xc3,0xc1,0xc1,0xc1,0xbf,0xbf,0xbf,0xbd,0xbd,0xbd,0xbb,0xbb,0xbb,0xb9,0xb9,0xb9,0xb7,0xb7,0xb7,0xb5,0xb5,0xb5,0xb3,0xb3,0xb3,0xb1,0xb1,0xb1,0xaf,0xaf,0xaf,0xad,0xad,0xad,0xab,0xab,0xab,0xa9,0xa9,0xa9,0xa7,0xa7,0xa7,0xa5,0xa5,0xa5,0xa3,0xa3,0xa3,0xa1,0xa1,0xa1,0x9f,0x9f,0x9f,0x9d,0x9d,0x9d,0x9b,0x9b,0x9b,0x99,0x99,0x99,0x97,0x97,0x97,0x95,0x95,0x95,0x93,0x93,0x93,0x91,0x91,0x91,0x8f,0x8f,0x8f,0x8d,0x8d,0x8d,0x8b,0x8b,0x8b,0x89,0x89,0x89,0x87,0x87,0x87,0x85,0x85,0x85,0x83,0x83,0x83,0x81,0x81,0x81,0x7e,0x7e,0x7e,0x7c,0x7c,0x7c,0x7a,0x7a,0x7a,0x78,0x78,0x78,0x76,0x76,0x76,0x74,0x74,0x74,0x72,0x72,0x72,0x70,0x70,0x70,0x6e,0x6e,0x6e,0x6c,0x6c,0x6c,0x6a,0x6a,0x6a,0x68,0x68,0x68,0x66,0x66,0x66,0x64,0x64,0x64,0x62,0x62,0x62,0x60,0x60,0x60,0x5e,0x5e,0x5e,0x5c,0x5c,0x5c,0x5a,0x5a,0x5a,0x58,0x58,0x58,0x56,0x56,0x56,0x54,0x54,0x54,0x52,0x52,0x52,0x50,0x50,0x50,0x4e,0x4e,0x4e,0x4c,0x4c,0x4c,0x4a,0x4a,0x4a,0x48,0x48,0x48,0x46,0x46,0x46,0x44,0x44,0x44,0x42,0x42,0x42,0x40,0x40,0x40,0x3e,0x3e,0x3e,0x3c,0x3c,0x3c,0x3a,0x3a,0x3a,0x38,0x38,0x38,0x36,0x36,0x36,0x34,0x34,0x34,0x32,0x32,0x32,0x30,0x30,0x30,0x2e,0x2e,0x2e,0x2c,0x2c,0x2c,0x2a,0x2a,0x2a,0x28,0x28,0x28,0x26,0x26,0x26,0x24,0x24,0x24,0x22,0x22,0x22,0x20,0x20,0x20,0x1e,0x1e,0x1e,0x1c,0x1c,0x1c,0x1a,0x1a,0x1a,0x18,0x18,0x18,0x16,0x16,0x16,0x14,0x14,0x14,0x12,0x12,0x12,0x10,0x10,0x10,0x0e,0x0e,0x0e,0x0c,0x0c,0x0c,0x0a,0x0a,0x0a,0x08,0x08,0x08,0x06,0x06,0x06,0x04,0x04,0x04,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x09,0x02,0x00,0x10,0x04,0x00,0x18,0x06,0x00,0x1f,0x08,0x00,0x26,0x0a,0x00,0x2d,0x0c,0x00,0x35,0x0e,0x00,0x3c,0x11,0x00,0x43,0x13,0x00,0x4a,0x15,0x00,0x52,0x17,0x00,0x59,0x19,0x00,0x60,0x1b,0x00,0x67,0x1d,0x00,0x6f,0x1f,0x00,0x76,0x24,0x00,0x78,0x29,0x00,0x79,0x2e,0x00,0x7a,0x33,0x00,0x7b,0x38,0x00,0x7c,0x3d,0x00,0x7d,0x42,0x00,0x7e,0x47,0x00,0x7f,0x4c,0x01,0x80,0x51,0x01,0x81,0x56,0x01,0x82,0x5b,0x01,0x83,0x60,0x01,0x84,0x65,0x01,0x85,0x6a,0x01,0x86,0x6f,0x01,0x87,0x74,0x01,0x88,0x79,0x01,0x88,0x7d,0x02,0x89,0x82,0x02,0x89,0x87,0x03,0x89,0x8b,0x03,0x8a,0x90,0x03,0x8a,0x95,0x04,0x8a,0x99,0x04,0x8b,0x9e,0x05,0x8b,0xa3,0x05,0x8b,0xa7,0x05,0x8c,0xac,0x06,0x8c,0xb1,0x06,0x8c,0xb5,0x07,0x8d,0xba,0x07,0x8d,0xbd,0x0a,0x89,0xbf,0x0d,0x84,0xc2,0x10,0x7f,0xc4,0x13,0x79,0xc6,0x16,0x74,0xc8,0x19,0x6f,0xcb,0x1c,0x6a,0xcd,0x1f,0x65,0xcf,0x22,0x5f,0xd1,0x25,0x5a,0xd4,0x28,0x55,0xd6,0x2b,0x50,0xd8,0x2e,0x4b,0xda,0x31,0x45,0xdd,0x34,0x40,0xdf,0x37,0x3b,0xe0,0x39,0x31,0xe1,0x3c,0x2f,0xe2,0x40,0x2c,0xe3,0x43,0x2a,0xe4,0x47,0x27,0xe5,0x4a,0x25,0xe6,0x4e,0x22,0xe7,0x51,0x20,0xe7,0x55,0x1d,0xe8,0x58,0x1b,0xe9,0x5c,0x18,0xea,0x5f,0x16,0xeb,0x63,0x13,0xec,0x66,0x11,0xed,0x6a,0x0e,0xee,0x6d,0x0c,0xef,0x70,0x0c,0xf0,0x74,0x0c,0xf0,0x77,0x0c,0xf1,0x7b,0x0c,0xf1,0x7f,0x0c,0xf2,0x82,0x0c,0xf2,0x86,0x0c,0xf3,0x8a,0x0c,0xf3,0x8d,0x0d,0xf4,0x91,0x0d,0xf4,0x95,0x0d,0xf5,0x98,0x0d,0xf5,0x9c,0x0d,0xf6,0xa0,0x0d,0xf6,0xa3,0x0d,0xf7,0xa7,0x0d,0xf7,0xab,0x0d,0xf8,0xaf,0x0e,0xf8,0xb2,0x0f,0xf9,0xb6,0x10,0xf9,0xb9,0x12,0xfa,0xbd,0x13,0xfa,0xc0,0x14,0xfb,0xc4,0x15,0xfb,0xc7,0x16,0xfc,0xcb,0x17,0xfc,0xce,0x18,0xfd,0xd2,0x19,0xfd,0xd5,0x1b,0xfe,0xd9,0x1c,0xfe,0xdc,0x1d,0xff,0xe0,0x1e,0xff,0xe3,0x27,0xff,0xe5,0x35,0xff,0xe7,0x43,0xff,0xe9,0x51,0xff,0xea,0x5f,0xff,0xec,0x6d,0xff,0xee,0x7b,0xff,0xf0,0x89,0xff,0xf2,0x97,0xff,0xf4,0xa5,0xff,0xf6,0xb3,0xff,0xf8,0xc1,0xff,0xf9,0xcf,0xff,0xfb,0xdd,0xff,0xfd,0xeb,0xff,0xff,0xf5}; diff --git a/palettes/Rainbow.h b/palettes/Rainbow.h new file mode 100644 index 0000000..f4e1f44 --- /dev/null +++ b/palettes/Rainbow.h @@ -0,0 +1 @@ +static unsigned char palette_Rainbow[]={0x01,0x03,0x4a,0x00,0x03,0x4a,0x00,0x03,0x4b,0x00,0x03,0x4b,0x00,0x03,0x4c,0x00,0x03,0x4c,0x00,0x03,0x4d,0x00,0x03,0x4f,0x00,0x03,0x52,0x00,0x05,0x55,0x00,0x07,0x58,0x00,0x0a,0x5b,0x00,0x0e,0x5e,0x00,0x13,0x62,0x00,0x16,0x64,0x00,0x19,0x67,0x00,0x1c,0x6a,0x00,0x20,0x6d,0x00,0x23,0x70,0x00,0x26,0x74,0x00,0x28,0x77,0x00,0x2a,0x7b,0x00,0x2d,0x80,0x00,0x31,0x85,0x00,0x32,0x86,0x00,0x33,0x88,0x00,0x34,0x89,0x00,0x35,0x8b,0x00,0x36,0x8e,0x00,0x37,0x90,0x00,0x38,0x91,0x00,0x3a,0x95,0x00,0x3d,0x9a,0x00,0x3f,0x9c,0x00,0x41,0x9f,0x00,0x42,0xa1,0x00,0x44,0xa4,0x00,0x45,0xa7,0x00,0x47,0xaa,0x00,0x49,0xae,0x00,0x4b,0xb3,0x00,0x4c,0xb5,0x00,0x4e,0xb8,0x00,0x4f,0xbb,0x00,0x50,0xbc,0x00,0x51,0xbe,0x00,0x54,0xc2,0x00,0x57,0xc6,0x00,0x58,0xc8,0x00,0x5a,0xcb,0x00,0x5c,0xcd,0x00,0x5e,0xcf,0x00,0x5e,0xd0,0x00,0x5f,0xd1,0x00,0x60,0xd2,0x00,0x61,0xd3,0x00,0x63,0xd6,0x00,0x66,0xd9,0x00,0x67,0xda,0x00,0x68,0xdb,0x00,0x69,0xdc,0x00,0x6b,0xdd,0x00,0x6d,0xdf,0x00,0x6f,0xdf,0x00,0x71,0xdf,0x00,0x73,0xde,0x00,0x75,0xdd,0x00,0x76,0xdc,0x01,0x78,0xdb,0x01,0x7a,0xd9,0x02,0x7c,0xd8,0x02,0x7e,0xd6,0x03,0x81,0xd4,0x03,0x83,0xcf,0x04,0x84,0xcd,0x04,0x85,0xca,0x04,0x86,0xc5,0x05,0x88,0xc0,0x06,0x8a,0xb9,0x07,0x8d,0xb2,0x08,0x8e,0xac,0x0a,0x90,0xa6,0x0a,0x90,0xa2,0x0b,0x91,0x9e,0x0c,0x92,0x99,0x0d,0x93,0x95,0x0f,0x95,0x8c,0x11,0x97,0x84,0x16,0x99,0x78,0x19,0x9a,0x73,0x1c,0x9c,0x6d,0x22,0x9e,0x65,0x28,0xa0,0x5e,0x2d,0xa2,0x56,0x33,0xa4,0x4f,0x3b,0xa7,0x45,0x43,0xab,0x3c,0x48,0xad,0x36,0x4e,0xaf,0x30,0x53,0xb1,0x2b,0x59,0xb3,0x27,0x5d,0xb5,0x23,0x62,0xb7,0x1f,0x69,0xb9,0x1a,0x6d,0xbb,0x17,0x71,0xbc,0x15,0x76,0xbd,0x13,0x7b,0xbf,0x11,0x80,0xc1,0x0e,0x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xfe,0x4d,0x2d,0xfe,0x45,0x2f,0xfe,0x3e,0x31,0xfd,0x39,0x32,0xfd,0x35,0x34,0xfc,0x31,0x35,0xfc,0x2d,0x37,0xfb,0x27,0x39,0xfb,0x21,0x3b,0xfb,0x20,0x3c,0xfb,0x1f,0x3c,0xfb,0x1e,0x3d,0xfb,0x1d,0x3d,0xfb,0x1c,0x3e,0xfa,0x1b,0x3f,0xfa,0x1b,0x41,0xf9,0x1a,0x42,0xf9,0x1a,0x44,0xf8,0x19,0x46,0xf8,0x18,0x49,0xf7,0x18,0x4b,0xf7,0x19,0x4d,0xf7,0x19,0x4f,0xf7,0x1a,0x51,0xf7,0x20,0x53,0xf7,0x23,0x55,0xf7,0x26,0x56,0xf7,0x2a,0x58,0xf7,0x2e,0x5a,0xf7,0x32,0x5c,0xf8,0x37,0x5e,0xf8,0x3b,0x60,0xf8,0x40,0x62,0xf8,0x48,0x65,0xf9,0x51,0x68,0xf9,0x57,0x6a,0xfa,0x5d,0x6c,0xfa,0x5f,0x6d,0xfa,0x62,0x6e,0xfa,0x64,0x6f,0xfb,0x65,0x70,0xfb,0x66,0x71,0xfb,0x6d,0x75,0xfc,0x74,0x79,0xfc,0x79,0x7b,0xfd,0x7e,0x7e,0xfd,0x82,0x80,0xfe,0x87,0x83,0xfe,0x8b,0x85,0xfe,0x90,0x88,0xfe,0x97,0x8c,0xff,0x9e,0x90,0xff,0xa3,0x92,0xff,0xa8,0x95,0xff,0xad,0x98,0xff,0xb0,0x99,0xff,0xb2,0x9b,0xff,0xb8,0xa0,0xff,0xbf,0xa5,0xff,0xc3,0xa8,0xff,0xc7,0xac,0xff,0xcb,0xaf,0xff,0xcf,0xb3,0xff,0xd3,0xb6,0xff,0xd8,0xb9,0xff,0xda,0xbe,0xff,0xdc,0xc4,0xff,0xde,0xc8,0xff,0xe1,0xca,0xff,0xe3,0xcc,0xff,0xe6,0xce,0xff,0xe9,0xd0}; diff --git a/plank.h b/plank.h new file mode 100644 index 0000000..81558d3 --- /dev/null +++ b/plank.h @@ -0,0 +1,11 @@ +// -- define Flir calibration values --------------- +// exiftool -plan* FLIROne-2015-11-30-17-26-48+0100.jpg + +#define PlanckR1 16528.178 +#define PlanckB 1427.5 +#define PlanckF 1.0 +#define PlanckO -1307.0 +#define PlanckR2 0.012258549 + +#define TempReflected 20.0 // Reflected Apparent Temperature [°C] +#define Emissivity 0.95 // Emissivity of object