Skip to content

Commit

Permalink
Merge pull request #469 from micro-manager/fix-encoding
Browse files Browse the repository at this point in the history
Fix character encoding in source files
  • Loading branch information
marktsuchida authored Jun 19, 2024
2 parents de9d70a + 057499f commit 446fab8
Show file tree
Hide file tree
Showing 57 changed files with 506 additions and 471 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci-misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Misc checks

on:
pull_request:
push:
branches:
- main

jobs:
check-utf8-encoding:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./tools/check-utf8.sh
4 changes: 2 additions & 2 deletions DeviceAdapters/ABS/ABSCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ int CABSCamera::Initialize()
temperatureIndex_ = 0;

pAct = new CPropertyAction (this, &CABSCamera::OnTemperature);
nRet = CreateProperty(MM::g_Keyword_CCDTemperature, "20.0 °C", MM::String, true, pAct);
nRet = CreateProperty(MM::g_Keyword_CCDTemperature, "20.0 °C", MM::String, true, pAct);
assert(nRet == DEVICE_OK);
}
}
Expand Down Expand Up @@ -2956,7 +2956,7 @@ int CABSCamera::OnTemperature(MM::PropertyBase* pProp, MM::ActionType eAct)
if ( IsNoError( rc ) )
{
string temperature;
str::sprintf( temperature, "%3.2f °C \0\0", sTR.wSensorValue / temperatureUnit_ );
str::sprintf( temperature, "%3.2f °C \0\0", sTR.wSensorValue / temperatureUnit_ );
pProp->Set( temperature.c_str() );
}
return convertApiErrorCode( rc, __FUNCTION__ );
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/ABS/abscommontools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ bool ABSTools::GetOsVersion(OSVERSIONINFOEX &sOSVerEx)

if ( false == bOsVersionInfoEx )
{
// OSVersionEx - Struct wird nicht unterstützt!
// OSVersionEx - Struct wird nicht unterstützt!
// lese die default Struct...
sOSVerEx.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (!GetVersionEx ( (OSVERSIONINFO *) &sOSVerEx) )
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/ABS/dllmain.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.

#include "MMDevice.h"
#include "ModuleInterface.h"
Expand Down
6 changes: 3 additions & 3 deletions DeviceAdapters/ABS/include/camusb_api_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ USBAPI BOOL CCONV CamUSB_GetCameraResolutionInfo ( S_RESOLUTION_INFO* pResInfo,
*
* Valid from the next image on.
*
* \param pdwExposure_us Exposure / Integration time value in µs (us).
* \param pdwExposure_us Exposure / Integration time value in µs (us).
* \param nDevNr Camera index number, that identifies the
* camera device which should be used with this
* function
Expand Down Expand Up @@ -176,7 +176,7 @@ USBAPI BOOL CCONV CamUSB_GetCameraResolutionInfo ( S_RESOLUTION_INFO* pResInfo,
// nExposure contains now actual exposure time
}
nExposure = 20000; // 20000µs = 20ms
nExposure = 20000; // 20000µs = 20ms
if (CamUSB_SetExposureTime( &nExposure ) != TRUE)
{
// error see CamUSB_GetLastError
Expand All @@ -197,7 +197,7 @@ USBAPI BOOL CCONV CamUSB_SetExposureTime( LPDWORD pdwExposure_us,
// CamUSB_GetExposureTime
//! \brief returns the active Exposure Time.
//!
//! \param pdwExposure_us Exposure / Integration time value in µs (us).
//! \param pdwExposure_us Exposure / Integration time value in µs (us).
//! \param nDevNr Camera index number, that identifies the
//! camera device which should be used with this
//! function
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/ABS/include/common_constants_exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
#define ST_FPA640x512 0x0010 //!< InGaAs-Sensor 640x512(ShortWave-IR VGA)
#define ST_FPA320x256 0x0011 //!< InGaAs-Sensor 320x256(ShortWave-IR QVGA)
#define ST_FPA320x256_K 0x0012 //!< InGaAs-Sensor 320x256TEC (ShortWave-IR QVGA)
#define ST_FPA320x256_K22 0x0013 //!< InGaAs-Sensor 320x256TEC-2,2µm (ShortWave-IR QVGA)
#define ST_FPA320x256_K22 0x0013 //!< InGaAs-Sensor 320x256TEC-2,2µm (ShortWave-IR QVGA)

#define ST_VIIMAGIC_9221M 0x0014 //!< viimagic 9221 (Full-HD, Mono)
#define ST_VIIMAGIC_9221C 0x4014 //!< viimagic 9221 (Full-HD, Color)
Expand Down
36 changes: 18 additions & 18 deletions DeviceAdapters/ABS/include/common_structs_exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ typedef struct {

//! \brief Camera Exposure Data\n
//! Returned in "pData" by #CamUSB_GetFunctionCaps => functionID => #FUNC_EXPOSURE \n
//! The exposure unit is in micro seconds (µs).
//! The exposure unit is in micro seconds (µs).
typedef struct
{
u32 dwCountRanges; //!< count exposure ranges
Expand All @@ -493,7 +493,7 @@ typedef struct
//! => functionID => #FUNC_EXPOSURE
typedef struct
{
u32 dwExposure_us; //!< exposure time in µs
u32 dwExposure_us; //!< exposure time in µs

} STRUCT_PACKED S_EXPOSURE_PARAMS, S_EXPOSURE_RETVALS;

Expand Down Expand Up @@ -695,7 +695,7 @@ typedef struct
u16 wPortType; //!< port type setting (e.g. #PORT_TYPE_OUTPUT)
u16 wPortFeatures; //!< port features setting (e.g. #PORT_FEATURE_POL_ACTHIGH)
u16 wPortState; //!< port state setting (e.g. #PORT_STATE_SET)
u32 dwDelay; //!< port delay setting (µs)
u32 dwDelay; //!< port delay setting (µs)

} STRUCT_PACKED S_IO_PORT_PARAMS, S_IO_PORT_RETVALS;

Expand Down Expand Up @@ -983,9 +983,9 @@ typedef struct
u08 bHysterese; //!< (ignored) 0 => use internal default; use 1..100%
u08 bSpeed; //!< (ignored) 0 => use internal default; use 1..100% of max speed
u16 wOptions; //!< see #AEXP_OPTION_BRIGHNESSOFFSET
u32 dwMinExposure; //!< min. allowed exposure value for exposure control in µs (0 => default value)
u32 dwMinExposure; //!< min. allowed exposure value for exposure control in µs (0 => default value)

//! \brief max. allowed exposure value for exposure control in µs (0 => default value)\n
//! \brief max. allowed exposure value for exposure control in µs (0 => default value)\n
//! if value != 0 the current framerate settings may be affected, if you switch AutoExposure == off
//! it is recommended to read out the currently used framerate\n
u32 dwMaxExposure;
Expand Down Expand Up @@ -1081,7 +1081,7 @@ typedef struct
i32 dwOffset_y; //!< ROI vertical (y) offset
u08 bBitShift; //!< bitshift setting
u08 bTempSensorIndex; //!< index of sensor to get (see #S_TEMPERATURE_CAPS::dwSensors)
i16 wTemperature; //!< temperature sensor value in 1/100°C
i16 wTemperature; //!< temperature sensor value in 1/100°C
f32 fGain; //!< green or global gain value (during capture)
u32 dwReserved[9]; //!< reserved

Expand Down Expand Up @@ -1147,9 +1147,9 @@ typedef struct
//! returned by #CamUSB_GetFunctionCaps => functionID => #FUNC_HUE_SATURATION
typedef struct
{
i16 wHueMin; //!< minimum value (-180° default)
i16 wHueMax; //!< maximum value (+180° default)
i16 wHueStep; //!< modify at count of dwStep (1° default)
i16 wHueMin; //!< minimum value (-180° default)
i16 wHueMax; //!< maximum value (+180° default)
i16 wHueStep; //!< modify at count of dwStep (1° default)
i16 wSatMin; //!< minimum value (-100 default)
i16 wSatMax; //!< maximum value (+100 default)
i16 wSatStep; //!< modify at count of dwStep (1 default)
Expand Down Expand Up @@ -1256,7 +1256,7 @@ typedef struct
{
u32 dwTriggerOptions; //!< bitfield of available trigger options, see #TRIG_OPTION_NONE
u32 dwMaxCycleTime_ms; //!< max. trigger cycle time (in ms), used for timed CCD clear
u32 dwMaxMinPulseWidth_us;//!< max. value for minimum trigger pulse width settings (in µs)
u32 dwMaxMinPulseWidth_us;//!< max. value for minimum trigger pulse width settings (in µs)
u32 dwReserved[5]; //!< reserved

} STRUCT_PACKED S_TRIGGER_OPTION_CAPS;
Expand All @@ -1269,7 +1269,7 @@ typedef struct
{
u32 dwTriggerOptions; //!< bitfield of used trigger options, see #TRIG_OPTION_NONE
u32 dwCycleTime_ms; //!< trigger cycle time (in ms), used for timed CCD clear
u32 dwMinPulseWidth_us; //!< minimum trigger pulse width settings (in µs)
u32 dwMinPulseWidth_us; //!< minimum trigger pulse width settings (in µs)
u32 dwReserved[5]; //!< reserved

} STRUCT_PACKED S_TRIGGER_OPTION_PARAMS, S_TRIGGER_OPTION_RETVALS;
Expand Down Expand Up @@ -1627,7 +1627,7 @@ typedef struct
typedef struct
{
u64 qwFunctionMask;
u32 dwExposure_us; //!< exposure time in µs
u32 dwExposure_us; //!< exposure time in µs
u16 wGainChannel; //!< gain channel to set, more than one channel possible (e.g.#GAIN_RED | #GAIN_BLUE)
u08 bReserved[2]; //!< reserved
u32 dwGain[MAX_GAIN_CHANNELS_ONCE]; //!< gain values
Expand Down Expand Up @@ -1839,17 +1839,17 @@ typedef struct
u08 bCoolingLevelStep; //!< cooling level step size in percent, e.g. 1 corresponds 1% and 100 => 100% (only for #CM_TEC_AUTOMATIC)
i16 wTargetTempMin; //!< minimum supported target temperature value for automatic cooling
i16 wTargetTempMax; //!< maximum supported target temperature value for automatic cooling
u16 wTargetTempStep; //!< possible temperature step size (e.g. 10 corresponds 1.0°C and 5 => 0.5°C and -124 = -12.4°C)
u16 wTargetTempStep; //!< possible temperature step size (e.g. 10 corresponds 1.0°C and 5 => 0.5°C and -124 = -12.4°C)
u16 wMinPeltierVoltage; //!< obsolate don't use (minimum peltier voltage e.g. 600 mean 0.6 V)
u16 wMaxPeltierVoltage; //!< obsolate don't use (maximum peltier voltage 9400 mean 9.4 V)

u08 bFanModeMask; //!< supported Fan modes #CM_FAN_OFF, #CM_FAN_AUTOMATIC or #CM_FAN_MANUAL
u08 bFanLevelMin; //!< minimum supported Fan level in percent (only for #CM_FAN_MANUAL)
u08 bFanLevelMax; //!< maximum supported Fan level in percent (only for #CM_FAN_MANUAL)
u08 bFanLevelStep; //!< Fan level step size in percent, e.g. 1 means 1% and 100 => 100% (only for #CM_FAN_MANUAL)
i16 wFanThreshTempMin; //!< minimum supported threshold temperature in 0.1°C, e.g. 10 => 1.0°C (only for #CM_FAN_AUTOMATIC)
i16 wFanThreshTempMax; //!< maximum supported threshold temperature in 0.1°C (only for #CM_FAN_AUTOMATIC)
i16 wFanThreshTempStep; //!< minimum supported threshold temperature in 0.1°C(only for #CM_FAN_AUTOMATIC)
i16 wFanThreshTempMin; //!< minimum supported threshold temperature in 0.1°C, e.g. 10 => 1.0°C (only for #CM_FAN_AUTOMATIC)
i16 wFanThreshTempMax; //!< maximum supported threshold temperature in 0.1°C (only for #CM_FAN_AUTOMATIC)
i16 wFanThreshTempStep; //!< minimum supported threshold temperature in 0.1°C(only for #CM_FAN_AUTOMATIC)
u08 bReserved[40]; //!< reserved

} STRUCT_PACKED S_COOLING_CAPS;
Expand All @@ -1861,14 +1861,14 @@ typedef struct
{
u08 bCoolingMode; //!< #CM_TEC_OFF, #CM_TEC_AUTOMATIC or #CM_TEC_MANUAL
u08 bReserved1[3]; //!< reserved
i16 wTargetTemp; //!< in 1/10 °C (10 => 1.0°C) only used with cooling mode #CM_TEC_AUTOMATIC
i16 wTargetTemp; //!< in 1/10 °C (10 => 1.0°C) only used with cooling mode #CM_TEC_AUTOMATIC
u08 bReserved2[2]; //!< reserved
u08 bCoolingLevel; //!< in percent (%) (15 => 15 %) only used with cooling mode #CM_TEC_MANUAL

u08 bReserved3[3]; //!< reserved
u08 bFanMode; //!< current Fan mode (#CM_FAN_OFF, #CM_FAN_AUTOMATIC or #CM_FAN_MANUAL), must be #CM_FAN_AUTOMATIC if #CM_TEC_AUTOMATIC is active)
u08 bReserved4[3]; //!< reserved
i16 wFanThreshTemp; //!< current threshold temperature in 0.1°C (only used with fan mode #CM_FAN_AUTOMATIC)
i16 wFanThreshTemp; //!< current threshold temperature in 0.1°C (only used with fan mode #CM_FAN_AUTOMATIC)
u08 bReserved5[2]; //!< reserved
u08 bFanLevel; //!< current Fan level in percent (only used with fan mode #CM_FAN_MANUAL)
u08 bReserved[43]; //!< reserved
Expand Down
8 changes: 4 additions & 4 deletions DeviceAdapters/CARVII/license.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Copyright (c) 2011, Childrens Hospital Los Angeles
Copyright (c) 2011, Childrens Hospital Los Angeles
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice,
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

Neither the name of Childrens Hospital Los Angeles nor the names of its
Neither the name of Childrens Hospital Los Angeles nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

Expand Down
4 changes: 2 additions & 2 deletions DeviceAdapters/Cobolt/Cobolt.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
// Strings
//

const char * g_DeviceVendorName = "HÜBNER Photonics";
const char * g_DeviceVendorName = "HÜBNER Photonics";
const char * g_DeviceCoboltName = "Cobolt";
const char * g_DeviceCoboltDescription = "Cobolt Controller by Karl Bellvé with contribution from Alexis Maizel";
const char * g_DeviceCoboltDescription = "Cobolt Controller by Karl Bellvé with contribution from Alexis Maizel";


const char * g_SendTerm = "\r";
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/CoboltOfficial/CoboltOfficial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ using namespace cobolt;

const char * g_DeviceName = "Cobolt Laser";
const char * g_DeviceDescription = "Official device adapter for Cobolt lasers.";
const char * g_DeviceVendorName = "Cobolt - a HÜBNER Group company";
const char * g_DeviceVendorName = "Cobolt - a HÜBNER Group company";

const char* const g_Property_Port_None = "None";

Expand Down
8 changes: 4 additions & 4 deletions DeviceAdapters/Corvus/Corvus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// XY Stage
// Z Stage
//
// AUTHOR: Johan Henriksson, [email protected], derived from Märzhauser adapter
// AUTHOR: Johan Henriksson, [email protected], derived from Märzhauser adapter
// COPYRIGHT: Johan Henriksson, 2010
// LICENSE: This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -345,7 +345,7 @@ int XYStage::Initialize()
return ret;
SetPropertyLimits("Speed [mm/s]", 0.001, 100.0); // mm/s

// Accel (Acceleration (in m/s²)
// Accel (Acceleration (in m/s²)
// -----
pAct = new CPropertyAction (this, &XYStage::OnAccel);
// TODO: get current Acceleration from the controller
Expand Down Expand Up @@ -406,7 +406,7 @@ bool XYStage::Busy()


/**
* Returns current position in µm.
* Returns current position in µm.
*/
int XYStage::GetPositionUm(double& x, double& y)
{
Expand Down Expand Up @@ -439,7 +439,7 @@ int ret;


/**
* Sets position in µm
* Sets position in µm
*/
int XYStage::SetPositionUm(double x, double y)
{
Expand Down
Loading

0 comments on commit 446fab8

Please sign in to comment.