:octocat: added QRMatrix::M* constants for dark values, removed M_TEST

This commit is contained in:
smiley
2023-11-24 00:16:25 +01:00
parent d5d728e79e
commit 9e484d0c3f
14 changed files with 215 additions and 168 deletions
+16 -16
View File
@@ -17,30 +17,30 @@ try{
$moduleValues = [
// finder
(QRMatrix::M_FINDER << 8) => $_POST['m_finder_dark'],
(QRMatrix::M_FINDER_DOT << 8) => $_POST['m_finder_dark'],
QRMatrix::M_FINDER => $_POST['m_finder_light'],
QRMatrix::M_FINDER_DARK => $_POST['m_finder_dark'],
QRMatrix::M_FINDER_DOT => $_POST['m_finder_dark'],
QRMatrix::M_FINDER => $_POST['m_finder_light'],
// alignment
(QRMatrix::M_ALIGNMENT << 8) => $_POST['m_alignment_dark'],
QRMatrix::M_ALIGNMENT => $_POST['m_alignment_light'],
QRMatrix::M_ALIGNMENT_DARK => $_POST['m_alignment_dark'],
QRMatrix::M_ALIGNMENT => $_POST['m_alignment_light'],
// timing
(QRMatrix::M_TIMING << 8) => $_POST['m_timing_dark'],
QRMatrix::M_TIMING => $_POST['m_timing_light'],
QRMatrix::M_TIMING_DARK => $_POST['m_timing_dark'],
QRMatrix::M_TIMING => $_POST['m_timing_light'],
// format
(QRMatrix::M_FORMAT << 8) => $_POST['m_format_dark'],
QRMatrix::M_FORMAT => $_POST['m_format_light'],
QRMatrix::M_FORMAT_DARK => $_POST['m_format_dark'],
QRMatrix::M_FORMAT => $_POST['m_format_light'],
// version
(QRMatrix::M_VERSION << 8) => $_POST['m_version_dark'],
QRMatrix::M_VERSION => $_POST['m_version_light'],
QRMatrix::M_VERSION_DARK => $_POST['m_version_dark'],
QRMatrix::M_VERSION => $_POST['m_version_light'],
// data
(QRMatrix::M_DATA << 8) => $_POST['m_data_dark'],
QRMatrix::M_DATA => $_POST['m_data_light'],
QRMatrix::M_DATA_DARK => $_POST['m_data_dark'],
QRMatrix::M_DATA => $_POST['m_data_light'],
// darkmodule
(QRMatrix::M_DARKMODULE << 8) => $_POST['m_darkmodule_dark'],
QRMatrix::M_DARKMODULE => $_POST['m_darkmodule_dark'],
// separator
QRMatrix::M_SEPARATOR => $_POST['m_separator_light'],
QRMatrix::M_SEPARATOR => $_POST['m_separator_light'],
// quietzone
QRMatrix::M_QUIETZONE => $_POST['m_quietzone_light'],
QRMatrix::M_QUIETZONE => $_POST['m_quietzone_light'],
];
$moduleValues = array_map(function($v){