Skip to content

Commit

Permalink
rename BiQU to BTT_TFT for better clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftFever committed Oct 16, 2023
1 parent e090f24 commit 6edf66e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1875,10 +1875,10 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
} else
m_enable_extrusion_role_markers = false;

// if thumbnail type of BIQU, insert above header
// if thumbnail type of BTT_TFT, insert above header
// if not, it is inserted under the header in its normal spot
const GCodeThumbnailsFormat m_gcode_thumbnail_format = print.full_print_config().opt_enum<GCodeThumbnailsFormat>("thumbnails_format");
if (m_gcode_thumbnail_format == GCodeThumbnailsFormat::BIQU)
if (m_gcode_thumbnail_format == GCodeThumbnailsFormat::BTT_TFT)
GCodeThumbnails::export_thumbnails_to_file(
thumbnail_cb, print.get_plate_index(), print.full_print_config().option<ConfigOptionPoints>("thumbnails")->values,
m_gcode_thumbnail_format,
Expand Down Expand Up @@ -1943,7 +1943,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
print.config().nozzle_temperature_initial_layer.get_at(0));
file.write("; CONFIG_BLOCK_END\n\n");
} else {
if (m_gcode_thumbnail_format != GCodeThumbnailsFormat::BIQU)
if (m_gcode_thumbnail_format != GCodeThumbnailsFormat::BTT_TFT)
GCodeThumbnails::export_thumbnails_to_file(
thumbnail_cb, print.get_plate_index(), print.full_print_config().option<ConfigOptionPoints>("thumbnails")->values,
m_gcode_thumbnail_format,
Expand Down
6 changes: 3 additions & 3 deletions src/libslic3r/GCode/Thumbnails.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ std::unique_ptr<CompressedImageBuffer> compress_thumbnail_qoi(const ThumbnailDat
return out;
}

std::unique_ptr<CompressedImageBuffer> compress_thumbnail_biqu(const ThumbnailData &data) {
std::unique_ptr<CompressedImageBuffer> compress_thumbnail_btt_tft(const ThumbnailData &data) {

// Take vector of RGBA pixels and flip the image vertically
std::vector<unsigned char> rgba_pixels(data.pixels.size());
Expand Down Expand Up @@ -188,8 +188,8 @@ std::unique_ptr<CompressedImageBuffer> compress_thumbnail(const ThumbnailData &d
return compress_thumbnail_jpg(data);
case GCodeThumbnailsFormat::QOI:
return compress_thumbnail_qoi(data);
case GCodeThumbnailsFormat::BIQU:
return compress_thumbnail_biqu(data);
case GCodeThumbnailsFormat::BTT_TFT:
return compress_thumbnail_btt_tft(data);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/libslic3r/GCode/Thumbnails.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ inline void export_thumbnails_to_file(ThumbnailsGeneratorCallback &thumbnail_cb,
if (data.is_valid()) {
auto compressed = compress_thumbnail(data, format);
if (compressed->data && compressed->size) {
if (format == GCodeThumbnailsFormat::BIQU) {
// write BIQU header
if (format == GCodeThumbnailsFormat::BTT_TFT) {
// write BTT_TFT header
output((";" + rjust(get_hex(data.width), 4, '0') + rjust(get_hex(data.height), 4, '0') + "\r\n").c_str());
output((char *) compressed->data);
if (i == (thumbnails.size() - 1))
Expand Down
4 changes: 2 additions & 2 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static const t_config_enum_values s_keys_map_GCodeThumbnailsFormat = {
{ "PNG", int(GCodeThumbnailsFormat::PNG) },
{ "JPG", int(GCodeThumbnailsFormat::JPG) },
{ "QOI", int(GCodeThumbnailsFormat::QOI) },
{ "BIQU", int(GCodeThumbnailsFormat::BIQU) }
{ "BTT_TFT", int(GCodeThumbnailsFormat::BTT_TFT) }
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(GCodeThumbnailsFormat)

Expand Down Expand Up @@ -4204,7 +4204,7 @@ def = this->add("filament_loading_speed", coFloats);
def->enum_values.push_back("PNG");
def->enum_values.push_back("JPG");
def->enum_values.push_back("QOI");
def->enum_values.push_back("BIQU");
def->enum_values.push_back("BTT_TFT");
def->set_default_value(new ConfigOptionEnum<GCodeThumbnailsFormat>(GCodeThumbnailsFormat::PNG));

def = this->add("use_relative_e_distances", coBool);
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ enum RetractLiftEnforceType {
};

enum class GCodeThumbnailsFormat {
PNG, JPG, QOI, BIQU
PNG, JPG, QOI, BTT_TFT
};

static std::string bed_type_to_gcode_string(const BedType type)
Expand Down

0 comments on commit 6edf66e

Please sign in to comment.