Skip to content

Two issues with Geophone on Arduino Due #3

Description

@catox0

(1) Multiple warnings on "narrowing conversion of [number] from 'int' to 'const int16_t in <twiddle_factors_256_br.h>

line 10: const int16_t twiddle_real[ 256 ] PROGMEM =
line 46: const int16_t twiddle_imag[ 256 ] PROGMEM =

Adding compiler directived for MEGA and DUE removes the problem. E.g.:

Expand line 46 to:

if defined( ARDUINO_AVR_MEGA2560 )

const int16_t twiddle_imag[ 256 ] PROGMEM =

elif defined( ARDUINO_SAM_DUE )

const int twiddle_imag[ 256 ] PROGMEM =

endif


Expand line 10 to:

if defined( ARDUINO_AVR_MEGA2560 )

const int16_t twiddle_real[ 256 ] PROGMEM =

elif defined( ARDUINO_SAM_DUE )

const int twiddle_real[ 256 ] PROGMEM =

endif


(2) Invalid conversion from 'int' to 'eAnalogReference' in <Geophone.ino>
line 1110: analogReference( DEFAULT );

According to the Arduino Due documentation, the analogReference() function is ignored on the Due.

Adding compiler directives restricting the analogReference to the MEGA removes the issue:

Expand line 1110 to:

#if defined( ARDUINO_AVR_MEGA2560 )
analogReference( DEFAULT );

#endif

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions