SmartStrip - Controllo prese elettriche da web

La macro F() ritorna un const __FlashStringHelper*

#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))

Mentre la get_get_parameter() accetta un __FlashStringHelper*

char *get_get_parameter (__FlashStringHelper *param);

In SmartStrip2.ino ci sono righe come:

param = request.get_get_parameter (F("mac"));

che forzano il passaggio di un puntatore const ad uno non const. Ovviamente ciò è proibito, perché significherebbe passare da read-only a read-write.

Forse la get_get_parameter() dovrebbe essere dichiarata così:

char *get_get_parameter (const __FlashStringHelper *param);

?