refactor: convert simufatfs to C++17 (#6454)
This commit is contained in:
@@ -22,11 +22,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "location.h"
|
||||
#include "edgetx.h"
|
||||
|
||||
#if defined(COLORLCD)
|
||||
|
||||
#include "simpgmspace.h"
|
||||
#include "bitmaps.h"
|
||||
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
@@ -47,8 +45,7 @@ void convert_RGB565_to_RGB888(uint8_t* dst, const BitmapBuffer* src, coord_t w,
|
||||
|
||||
void dumpImage(const std::string& filename, const BitmapBuffer* dc)
|
||||
{
|
||||
std::string fullpath = TESTS_PATH "/images/color/failed_" + filename;
|
||||
|
||||
std::string fullpath = simuFatfsGetRealPath("images/color/failed_" + filename);
|
||||
TRACE("dumping image '%s'", fullpath.c_str());
|
||||
|
||||
// allocate enough for 3 channels
|
||||
@@ -72,7 +69,7 @@ bool checkScreenshot_colorlcd(const BitmapBuffer* dc, const char* test)
|
||||
filename += 'x' + std::to_string(LCD_H);
|
||||
filename += ".png";
|
||||
|
||||
std::string fullpath = TESTS_PATH "/images/color/" + filename;
|
||||
std::string fullpath = "images/color/" + filename;
|
||||
|
||||
std::unique_ptr<BitmapBuffer> testPict(
|
||||
BitmapBuffer::loadBitmap(fullpath.c_str()));
|
||||
@@ -265,8 +262,7 @@ TEST(Lcd_colorlcd, bitmap)
|
||||
dc.clear(COLOR_THEME_SECONDARY3);
|
||||
|
||||
dc.setClippingRect(100, 400, 50, 200);
|
||||
std::unique_ptr<BitmapBuffer> bmp(
|
||||
BitmapBuffer::loadBitmap(TESTS_PATH "/images/color/edgetx.png"));
|
||||
std::unique_ptr<BitmapBuffer> bmp(BitmapBuffer::loadBitmap("images/color/edgetx.png"));
|
||||
dc.drawBitmap(0, 0, bmp.get());
|
||||
dc.drawBitmap(320, 0, bmp.get());
|
||||
dc.drawBitmap(0, 150, bmp.get());
|
||||
|
||||
Reference in New Issue
Block a user