File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -436,13 +436,15 @@ void NB_SMS::flush()
436436 }
437437}
438438
439- void NB_SMS::clear ()
439+ void NB_SMS::clear (int flag )
440440{
441441 _ptrUTF8 = " " ;
442442
443443 while (MODEM.ready () == 0 );
444444
445- MODEM.sendf (" AT+CMGD=0,2" );
445+ if (flag<1 || flag>4 ) flag = 2 ;
446+
447+ MODEM.sendf (" AT+CMGD=0,%d" ,flag);
446448
447449 if (_synch) {
448450 MODEM.waitForResponse (55000 );
Original file line number Diff line number Diff line change 2222
2323#include < Stream.h>
2424
25+ #define NB_SMS_CLEAR_READ (1 )
26+ #define NB_SMS_CLEAR_READ_SENT (2 )
27+ #define NB_SMS_CLEAR_READ_SENT_UNSENT (3 )
28+ #define NB_SMS_CLEAR_ALL (4 )
29+
2530class NB_SMS : public Stream {
2631
2732public:
@@ -86,7 +91,7 @@ class NB_SMS : public Stream {
8691
8792 /* * Delete all read and sent SMS from Modem memory and process answer
8893 */
89- void clear ();
94+ void clear (int flag = NB_SMS_CLEAR_READ_SENT );
9095
9196private:
9297 bool _synch;
You can’t perform that action at this time.
0 commit comments