warning: invalid conversion from 'const AvcInMessageTable*' to 'AvcInMessageTabl

Hello, I started a project and encountered a problem. I am quite new to writing code for this please for help.

Here's the error :

\Arduino\libraries\AVCLanDrv\AVCLanDrv.cpp: In member function 'void AVCLanDrv::getActionID2()':

\Arduino\libraries\AVCLanDrv\AVCLanDrv.cpp:84:58: warning: invalid conversion from 'const AvcInMessageTable*' to 'AvcInMessageTable*' [-fpermissive]

   avclan.actionID = avclan.getActionID(mtMain, mtMainSize);    

                                                          ^

In file included from \Arduino\libraries\AVCLanDrv\AVCLanDrv.cpp:7:0:

\Arduino\libraries\AVCLanDrv\AVCLanDrv.h:130:8: note: initializing argument 1 of 'byte AVCLanDrv::getActionID(AvcInMessageTable*, byte)'

   byte getActionID (AvcInMessageTable messageTable[], byte mtSize);

        ^

Here is part of code AVCLanDrv.cpp

static const AvcInMessageTable  mtMain[] PROGMEM = {
	{ACT_SCAN_ON,        0x04, {0x00, 0x25, 0x43, 0xA6}},
	{ACT_SCAN_D_ON,      0x04, {0x00, 0x25, 0x43, 0xA9}},
	{ACT_REPEAT_ON,      0x04, {0x00, 0x25, 0x43, 0xA0}},
	{ACT_REPEAT_D_ON,    0x04, {0x00, 0x25, 0x43, 0xA3}},
	{ACT_RANDOM_ON,      0x04, {0x00, 0x25, 0x43, 0xB0}},
	{ACT_RANDOM_D_ON,    0x04, {0x00, 0x25, 0x43, 0xB3}},
};
const byte mtMainSize = sizeof(mtMain) / sizeof(AvcInMessageTable);

void AVCLanDrv::getActionID2(){	
		avclan.actionID = avclan.getActionID(mtMain, mtMainSize);				
};
.
.
.
.
// Use the last received message to determine the corresponding action ID
byte AVCLanDrv::getActionID(AvcInMessageTable messageTable[], byte mtSize){
	if (slaveAddress != deviceAddress && slaveAddress != 0x0FFF) return ACT_NONE;
	for (byte msg = 0; msg < mtSize; msg++){
		bool found = true;
		
		if (dataSize != pgm_read_byte_near(&messageTable[msg].dataSize)){
			continue;
		}
		for (byte i = 0; i < dataSize; i++){
			if (message[i] != pgm_read_byte_near(&messageTable[msg].data[i])){
				found = false;
				break;
			}
		}

		if (found){
			return pgm_read_byte_near(&messageTable[msg].actionID);
		}
	}

	return ACT_NONE;
}
....
....
.
AVCLanDrv avclan;

in H file :

typedef enum{
	ACT_SCAN_ON,
	ACT_SCAN_OFF,
	ACT_SCAN_D_ON,
	ACT_SCAN_D_OFF,
	ACT_REPEAT_ON,
	ACT_REPEAT_OFF,
	ACT_REPEAT_D_ON,
	ACT_REPEAT_D_OFF,
	ACT_RANDOM_ON,
	ACT_RANDOM_OFF,
	ACT_RANDOM_D_ON,
	ACT_RANDOM_D_OFF,
} AvcActionID;

typedef struct
{
	byte	actionID;           // Action id
	byte	dataSize;           // message size (bytes)
	byte	data[12];           // message
} AvcInMessageTable;


class AVCLanDrv{
	public:
		
		byte	getActionID (AvcInMessageTable messageTable[], byte mtSize);
		byte	getActionID (AvcInMaskedMessageTable messageTable[], byte mtSize);
		void	getActionID2();               // get action id by recieved message, obligatory method
		void	processAction(AvcActionID);  // process action, obligatory method

(deleted)

byte AVCLanDrv::getActionID(AvcInMessageTable messageTable[], byte mtSize){

You are passing mtMain to this function. mtMain is a static const AvcInMessageTable array. The function does NOT expect a const array.

Make the argument type match the function prototype or make the function prototype match the argument type.

If the function getActionID(AvcInMessageTable messageTable[], byte mtSize) needs to write into the messageTable (I'm guessing it doesn't) then the passing a const table is inappropriate and you should remove the 'const' keyword from the declaration of your table.

If it DOESN'T need to write into the table, go into the source file:

\Arduino\libraries\AVCLanDrv\AVCLanDrv.h
And change the declaration to:

byte AVCLanDrv::getActionID(const AvcInMessageTable messageTable[], byte mtSize) {

If the function getActionID(AvcInMessageTable messageTable[], byte mtSize) needs to write into the messageTable

it would be shit out of luck, since the table being passed in is in PROGMEM.