8000 HSC readPosition returns an int instead of an unsigned int. Doesn't match function header · Issue #26 · facts-engineering/P1AM · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
HSC readPosition returns an int instead of an unsigned int. Doesn't match function header #26
Open
@Ragiton

Description

@Ragiton

P1AM/src/P1_HSC.cpp

Lines 173 to 187 in b1a57aa

/*******************************************************************************
Description: Reads the current positon of the channel in counts. Value is a
32 bit unsigned interger and will roll under/over at 0xFFFFFFFF
Parameters: -none
Returns: -int current position in counts
Example Code:
*******************************************************************************/
int P1_HSC_Channel::readPosition(void){
return (int)P1.readAnalog(slotNumber,channelNumber);
}

This function returns an int when the function header says it will return an unsigned int. I'm not sure if the rollover will work properly this way. Can you please advise?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0