From 4e43a366acbdc08e445332646cc173327ae89a17 Mon Sep 17 00:00:00 2001 From: Kevin Mock <38329905+kevmk04@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:19:08 -0600 Subject: [PATCH 1/5] Fix DigitalOutputs writeAll function logical operator --- src/DigitalOutputsClass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DigitalOutputsClass.cpp b/src/DigitalOutputsClass.cpp index 97eb7a4..cf492f4 100644 --- a/src/DigitalOutputsClass.cpp +++ b/src/DigitalOutputsClass.cpp @@ -77,7 +77,7 @@ void DigitalOutputsClass::write(uint8_t channel, PinStatus val) { void DigitalOutputsClass::writeAll(uint8_t val_mask) { for (uint8_t ch = 0; ch < 8; ch++) { - if (val_mask && (1 << ch)) { + if (val_mask & (1 << ch)) { write(ch, HIGH); } else { write(ch, LOW); @@ -94,4 +94,4 @@ void DigitalOutputsClass::_setAutoRetryMode() { } DigitalOutputsClass MachineControl_DigitalOutputs; -/**** END OF FILE ****/ \ No newline at end of file +/**** END OF FILE ****/ From ef91f67a209c84b228457a883c39dcd8be4c925d Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Fri, 17 May 2024 09:20:45 +0200 Subject: [PATCH 2/5] remove former license headers --- src/utility/MAX31865/MAX31865.cpp | 19 ------------------- src/utility/MAX31865/MAX31865.h | 19 ------------------- src/utility/RTC/PCF8563T.cpp | 19 ------------------- src/utility/RTC/PCF8563T.h | 19 ------------------- src/utility/THERMOCOUPLE/MAX31855.cpp | 19 ------------------- src/utility/THERMOCOUPLE/MAX31855.h | 19 ------------------- src/utility/ioexpander/ArduinoIOExpander.cpp | 16 ---------------- src/utility/ioexpander/ArduinoIOExpander.h | 16 ---------------- 8 files changed, 146 deletions(-) diff --git a/src/utility/MAX31865/MAX31865.cpp b/src/utility/MAX31865/MAX31865.cpp index 985812e..cdcd1e4 100644 --- a/src/utility/MAX31865/MAX31865.cpp +++ b/src/utility/MAX31865/MAX31865.cpp @@ -1,22 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (c) 2021 Arduino SA. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #include "MAX31865.h" diff --git a/src/utility/MAX31865/MAX31865.h b/src/utility/MAX31865/MAX31865.h index f95969b..eb689af 100644 --- a/src/utility/MAX31865/MAX31865.h +++ b/src/utility/MAX31865/MAX31865.h @@ -1,22 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (c) 2021 Arduino SA. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #ifndef MAX31865_H #define MAX31865_H diff --git a/src/utility/RTC/PCF8563T.cpp b/src/utility/RTC/PCF8563T.cpp index 57d5a21..307eb96 100644 --- a/src/utility/RTC/PCF8563T.cpp +++ b/src/utility/RTC/PCF8563T.cpp @@ -1,22 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (c) 2020 Arduino SA. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #include "PCF8563T.h" #define PCF8563T_ADDRESS 0x51 diff --git a/src/utility/RTC/PCF8563T.h b/src/utility/RTC/PCF8563T.h index 12786cb..5ac6be5 100644 --- a/src/utility/RTC/PCF8563T.h +++ b/src/utility/RTC/PCF8563T.h @@ -1,22 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (c) 2020 Arduino SA. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #ifndef _PCF8563T_H_INCLUDED #define _PCF8563T_H_INCLUDED diff --git a/src/utility/THERMOCOUPLE/MAX31855.cpp b/src/utility/THERMOCOUPLE/MAX31855.cpp index 80f580e..eb2e64a 100644 --- a/src/utility/THERMOCOUPLE/MAX31855.cpp +++ b/src/utility/THERMOCOUPLE/MAX31855.cpp @@ -1,22 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (c) 2020 Arduino SA. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #include "MAX31855.h" const double MAX31855Class::Jm210_760[] ; diff --git a/src/utility/THERMOCOUPLE/MAX31855.h b/src/utility/THERMOCOUPLE/MAX31855.h index 4334c3c..f2924b7 100644 --- a/src/utility/THERMOCOUPLE/MAX31855.h +++ b/src/utility/THERMOCOUPLE/MAX31855.h @@ -1,22 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (c) 2020 Arduino SA. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #ifndef _MAX31855_H_ #define _MAX31855_H_ diff --git a/src/utility/ioexpander/ArduinoIOExpander.cpp b/src/utility/ioexpander/ArduinoIOExpander.cpp index 461e72e..b2c1738 100644 --- a/src/utility/ioexpander/ArduinoIOExpander.cpp +++ b/src/utility/ioexpander/ArduinoIOExpander.cpp @@ -1,19 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (C) 2020 Arduino AG (http://www.arduino.cc/) - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #include "ArduinoIOExpander.h" bool ArduinoIOExpanderClass::begin() diff --git a/src/utility/ioexpander/ArduinoIOExpander.h b/src/utility/ioexpander/ArduinoIOExpander.h index e7cd402..66e4de1 100644 --- a/src/utility/ioexpander/ArduinoIOExpander.h +++ b/src/utility/ioexpander/ArduinoIOExpander.h @@ -1,19 +1,3 @@ -/* - This file is part of the MachineControl library. - Copyright (C) 2020 Arduino AG (http://www.arduino.cc/) - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - #pragma once #include From e916c9c3eee5af49593a9c913d29155c7b8567b9 Mon Sep 17 00:00:00 2001 From: kolaha99 <42593376+kolaha99@users.noreply.github.com> Date: Tue, 18 Jun 2024 05:09:13 +0200 Subject: [PATCH 3/5] Update MAX31855.cpp oops, 0x800 was wrong too --- src/utility/THERMOCOUPLE/MAX31855.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/THERMOCOUPLE/MAX31855.cpp b/src/utility/THERMOCOUPLE/MAX31855.cpp index eb2e64a..c0eba19 100644 --- a/src/utility/THERMOCOUPLE/MAX31855.cpp +++ b/src/utility/THERMOCOUPLE/MAX31855.cpp @@ -208,7 +208,7 @@ float MAX31855Class::readReferenceTemperature(int type) // The cold junction reference temperature is stored in the first 11 word's bits // sent by the Thermocouple-to-Digital Converter - rawword = rawword & 0x7FF; + rawword = rawword & 0xFFF; // check sign bit and convert to negative value. if (rawword & 0x800) { ref = (0xF800 | (rawword & 0x7FF))*0.0625; From fe1f72950b6ce7eaf7d8eba3ccd6bf3728af0863 Mon Sep 17 00:00:00 2001 From: kolaha99 <42593376+kolaha99@users.noreply.github.com> Date: Wed, 19 Jun 2024 20:30:19 +0200 Subject: [PATCH 4/5] Update MAX31855.cpp no Serial.print --- src/utility/THERMOCOUPLE/MAX31855.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/THERMOCOUPLE/MAX31855.cpp b/src/utility/THERMOCOUPLE/MAX31855.cpp index c0eba19..03f5b23 100644 --- a/src/utility/THERMOCOUPLE/MAX31855.cpp +++ b/src/utility/THERMOCOUPLE/MAX31855.cpp @@ -216,7 +216,7 @@ float MAX31855Class::readReferenceTemperature(int type) // multiply for the LSB value ref = rawword * 0.0625f; } - Serial.println(ref); + return ref; } From 61fb03b36b130e5af22de852c32bf454f9587448 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis <45899760+leonardocavagnis@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:19:21 +0200 Subject: [PATCH 5/5] Update library.properties 1.0.2 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 22da0eb..5aacf4d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_PortentaMachineControl -version=1.0.1 +version=1.0.2 author=Arduino maintainer=Arduino sentence=Arduino Library for Portenta Machine Control (PMC)